diff options
author | Aria <me@aria.rip> | 2023-02-03 12:14:41 +0000 |
---|---|---|
committer | Aria <me@aria.rip> | 2023-02-03 12:14:41 +0000 |
commit | a6c9dba25ad9204ebde302728eb2a75532497f37 (patch) | |
tree | a977882c817fb612511cdabce959d4de027c5b22 /flake.nix |
initial commit
Diffstat (limited to 'flake.nix')
-rw-r--r-- | flake.nix | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..3f12c82 --- /dev/null +++ b/flake.nix @@ -0,0 +1,42 @@ +{ + description = "A command saver"; + + inputs = { + nixpkgs.url = "nixpkgs/nixos-22.11"; + flake-utils.url = "github:numtide/flake-utils"; + }; + + outputs = { self, nixpkgs, flake-utils }: + flake-utils.lib.eachDefaultSystem (system: + let + pkgs = import nixpkgs { inherit system; }; + lastModifiedDate = self.lastModifiedDate or self.lastModified or "19700101"; + version = builtins.substring 0 8 lastModifiedDate; + doe = pkgs.buildGoModule { + pname = "doe"; + inherit version; + + src = ./.; + + vendorSha256 = "sha256-pQpattmS9VmO3ZIQUFn66az8GSmB4IvYhTTCFn6SUmo="; + }; + in + { + + # Provide some binary packages for selected system types. + packages.default = doe; + apps.default = { + drv = doe; + name = "doe"; + }; + + devShells.default = pkgs.mkShell { + nativeBuildInputs = with pkgs; [ + go + gopls + ]; + }; + } + + ); +} |