Skip to content

Commit

Permalink
fix: fup-repl script
Browse files Browse the repository at this point in the history
  • Loading branch information
gytis-ivaskevicius committed Jul 2, 2024
1 parent 3542fe9 commit f2a6c2a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/fup-repl.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ writeShellScriptBin "repl" ''
;;
*)
if [ -z "$1" ]; then
nix repl ${./repl.nix}
nix repl --file ${./repl.nix}
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
;;
esac
Expand Down
4 changes: 2 additions & 2 deletions lib/repl.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ let

selfFlake =
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 [ ];

flakePath' = toString
Expand All @@ -21,7 +21,7 @@ let
nixpkgsFromInputsPath = flake.inputs.nixpkgs.outPath or "";
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
{ inherit flake; }
// flake
Expand Down

0 comments on commit f2a6c2a

Please sign in to comment.