mirror of
https://github.com/gytis-ivaskevicius/flake-utils-plus.git
synced 2024-10-05 20:47:49 +03:00
fix: fup-repl script
This commit is contained in:
parent
3542fe9126
commit
f2a6c2a04a
@ -11,9 +11,9 @@ writeShellScriptBin "repl" ''
|
|||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
if [ -z "$1" ]; then
|
if [ -z "$1" ]; then
|
||||||
nix repl ${./repl.nix}
|
nix repl --file ${./repl.nix}
|
||||||
else
|
else
|
||||||
nix repl --arg flakePath $(${coreutils}/bin/readlink -f $1 | ${gnused}/bin/sed 's|/flake.nix||') ${./repl.nix}
|
nix repl --arg flakePath $(${coreutils}/bin/readlink -f $1 | ${gnused}/bin/sed 's|/flake.nix||') --file ${./repl.nix}
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
@ -5,7 +5,7 @@ let
|
|||||||
|
|
||||||
selfFlake =
|
selfFlake =
|
||||||
if pathExists registryPath
|
if pathExists registryPath
|
||||||
then filter (it: it.from.id == "self") (fromJSON (readFile registryPath)).flakes
|
then filter (it: it.from.id == "self") (fromJSON (builtins.unsafeDiscardStringContext (readFile registryPath))).flakes
|
||||||
else [ ];
|
else [ ];
|
||||||
|
|
||||||
flakePath' = toString
|
flakePath' = toString
|
||||||
@ -21,7 +21,7 @@ let
|
|||||||
nixpkgsFromInputsPath = flake.inputs.nixpkgs.outPath or "";
|
nixpkgsFromInputsPath = flake.inputs.nixpkgs.outPath or "";
|
||||||
nixpkgs = flake.pkgs.${currentSystem}.nixpkgs or (if nixpkgsFromInputsPath != "" then import nixpkgsFromInputsPath { } else { });
|
nixpkgs = flake.pkgs.${currentSystem}.nixpkgs or (if nixpkgsFromInputsPath != "" then import nixpkgsFromInputsPath { } else { });
|
||||||
|
|
||||||
nixpkgsOutput = (removeAttrs (nixpkgs // nixpkgs.lib or { }) [ "options" "config" ]);
|
nixpkgsOutput = removeAttrs (nixpkgs // nixpkgs.lib or { }) [ "options" "config" ];
|
||||||
in
|
in
|
||||||
{ inherit flake; }
|
{ inherit flake; }
|
||||||
// flake
|
// flake
|
||||||
|
Loading…
Reference in New Issue
Block a user