Skip to content

Instantly share code, notes, and snippets.

@countoren
Created August 6, 2023 22:04
Show Gist options
  • Save countoren/03ae15aeb939cfb1435da1cbc8b4f8bf to your computer and use it in GitHub Desktop.
Save countoren/03ae15aeb939cfb1435da1cbc8b4f8bf to your computer and use it in GitHub Desktop.
{
outputs = { self, nixpkgs }:
let system = "x86_64-linux";
pkgs = import nixpkgs { inherit system; };
in
{
# while this works (nix run)
packages.${system}.default = pkgs.writeShellScriptBin "hello" "echo bla";
# this wont build try with nix run
# and in repl
# nix-repl> builtins.currentSystem
# "x86_64-linux"
#packages.${system}.default = pkgs.writeShellScriptBin "hello" "echo ${builtins.currentSystem}";
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment