Last active
March 28, 2023 12:16
-
-
Save lucperkins/68659d946b7eb3448199bbb9c15a756f to your computer and use it in GitHub Desktop.
This file contains hidden or 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
{ | |
inputs = { | |
nixpkgs.url = "nixpkgs"; | |
nuenv.url = "github:DeterminateSystems/nuenv"; | |
}; | |
outputs = { self, nixpkgs, nuenv }: let | |
overlays = [ nuenv.overlays.default ]; | |
systems = [ | |
"x86_64-linux" | |
"aarch64-linux" | |
"x86_64-darwin" | |
"aarch64-darwin" | |
]; | |
forAllSystems = f: nixpkgs.lib.genAttrs systems (system: f { | |
inherit system; | |
pkgs = import nixpkgs { inherit overlays system; }; | |
}); | |
in { | |
packages = forAllSystems ({ pkgs, system }: { | |
default = pkgs.nuenv.mkDerivation { | |
name = "hello"; | |
src = ./.; | |
# This script is Nushell, not Bash! | |
build = '' | |
"Hello" | save hello.txt | |
let out = $"($env.out)/share" | |
mkdir $out | |
cp hello.txt $out | |
''; | |
}; | |
}); | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment