diff options
| author | Ophestra Umiker <cat@ophivana.moe> | 2024-07-11 01:10:35 +0900 |
|---|---|---|
| committer | Ophestra Umiker <cat@ophivana.moe> | 2024-07-11 01:10:35 +0900 |
| commit | 94c69806ef496ac7e00fdc8e80f547606b883158 (patch) | |
| tree | 4587fd2e5a6f23163f81e0903effe5b6edb3481c /flake.nix | |
| parent | 2ef29ab52e321104a1ee863f4c1f19948f7da66f (diff) | |
nix: set up devShell
Since we're using cgo to call into libacl a few dependencies other than go are required to build.
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
Diffstat (limited to 'flake.nix')
| -rw-r--r-- | flake.nix | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/flake.nix b/flake.nix new file mode 100644 index 00000000..d79a3c14 --- /dev/null +++ b/flake.nix @@ -0,0 +1,35 @@ +{ + description = "ego development environment"; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/24.05"; + }; + + outputs = { self, nixpkgs }: + let + supportedSystems = [ "x86_64-linux" ]; + forAllSystems = f: nixpkgs.lib.genAttrs supportedSystems (system: f system); + in + { + devShells = forAllSystems + (system: + let + pkgs = import nixpkgs { + inherit system; + }; + in + { + default = with pkgs; mkShell + { + packages = [ + clang + acl + (pkgs.writeShellScriptBin "build" '' + go build -v -ldflags '-s -w -X main.Version=flake' + '') + ]; + }; + } + ); + }; +}
\ No newline at end of file |
