From f2a6c2a04aaea12c48025369e3d3b476a2a3a9e3 Mon Sep 17 00:00:00 2001 From: Gytis Ivaskevicius Date: Wed, 3 Jul 2024 00:07:29 +0300 Subject: [PATCH] fix: fup-repl script --- lib/fup-repl.nix | 4 ++-- lib/repl.nix | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/fup-repl.nix b/lib/fup-repl.nix index 7db79c2..e636b6f 100644 --- a/lib/fup-repl.nix +++ b/lib/fup-repl.nix @@ -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 diff --git a/lib/repl.nix b/lib/repl.nix index a46347a..9a1a098 100644 --- a/lib/repl.nix +++ b/lib/repl.nix @@ -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 @@ -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