[clever@amd-nixos:~/nix-tests]$ nix repl --allow-unsafe-native-code-during-evaluation
Welcome to Nix version 2.0. Type :? for help.
nix-repl> import ./secret-download.nix
{ ... }; }
nix-repl> import ./secret-download.nix
{ downloader = «derivation /nix/store/vkvj32swicvjc3hya36p06q9lb60sp7g-downloader.drv»; foo = { ... }; }
nix-repl> (import ./secret-download.nix).foo
{ val1 = 25; val2 = "uid=1000(clever) gid=100(users) groups=100(users),1(wheel),72(vboxusers),131(docker),500(wireshark)"; }
-
-
Save cleverca22/590cbb3e6b0ad1959e720d73c36e1e95 to your computer and use it in GitHub Desktop.
native secret download
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
with import <nixpkgs> {}; | |
rec { | |
downloader = writeScript "downloader" '' | |
#!${stdenv.shell} | |
echo "{val1 = 5 * 5; val2 = \"$(id)\"; } " | |
''; | |
foo = builtins.exec [ downloader ]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment