home

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit e7e6df1355a430506f10d198401cd124166b5508
parent 959f077c17450153537887ed4f33e975a162ce14
Author: Vincent Demeester <vincent@sbr.pm>
Date:   Fri, 31 Aug 2018 20:10:15 +0200

Fix unstable channel…

… lot's of changes induced by this... 😓

Signed-off-by: Vincent Demeester <vincent@sbr.pm>

Diffstat:
Mfish/nix-aliases.fish | 22++++++++++++++--------
1 file changed, 14 insertions(+), 8 deletions(-)

diff --git a/fish/nix-aliases.fish b/fish/nix-aliases.fish @@ -1,11 +1,12 @@ function _def_nix_run_aliases set -l stable mr sshfs wakeonlan:python36Packages.wakeonlan lspci:pciutils lsusb:usbutils beet:beets - set -l unstable op:1password update-desktop-database:destkop-file-utils + set -l unstable op:_1password update-desktop-database:desktop-file-utils + set -l channels_file ~/.config/nixpkgs/channels.nix for s in $stable - _nix_run_package $s + _nix_run_package $s nixpkgs end for s in $unstable - _nix_run_package $s "-f ~/.config/nixpkgs/channels.nix" + _nix_run_package $s unstable $channels_file end end @@ -14,18 +15,23 @@ function _nix_run_package set -l package (string split ":" $s) switch (count $package) case 1 - _nix_run $s $s $argv[2] + _nix_run $s $s $argv[2] $argv[3] case 2 - _nix_run $package[1] $package[2] $argv[2] + _nix_run $package[1] $package[2] $argv[2] $argv[3] end end function _nix_run set -l c $argv[1] set -l p $argv[2] - set -l extra $argv[3] - function $c --inherit-variable c --inherit-variable p --inherit-variable extra - nix run $extra "nixpkgs.$p" -c $c $argv + set -l channel $argv[3] + set -l channelsfile $argv[4] + function $c --inherit-variable c --inherit-variable p --inherit-variable channel --inherit-variable channelsfile + set -l cmd nix run + if test -n "$channelsfile" + set cmd $cmd -f $channelsfile + end + eval $cmd $channel.$p -c $c $argv end end