nix flake files

main
Jason Staten 2 years ago
parent f4596155b2
commit 7e163186ad

@ -0,0 +1,42 @@
{
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1664281702,
"narHash": "sha256-haixZ4TJLu1Dciow54wrHrHvlGDVr5sW6MTeAV/ZLuI=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "7e52b35fe98481a279d89f9c145f8076d049d2b9",
"type": "github"
},
"original": {
"id": "nixpkgs",
"ref": "nixos-unstable",
"type": "indirect"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs",
"utils": "utils"
}
},
"utils": {
"locked": {
"lastModified": 1659877975,
"narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
}
},
"root": "root",
"version": 7
}

@ -0,0 +1,39 @@
{
description = "TodoMVC in Go";
inputs = {
nixpkgs.url = "nixpkgs/nixos-unstable";
utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, utils }:
utils.lib.eachDefaultSystem (system:
let
lastModifiedDate = self.lastModifiedDate or self.lastModified or "19700101";
version = builtins.substring 0 8 lastModifiedDate;
pkgs = import nixpkgs {
inherit system;
overlays = [
(final: prev: {
go = prev.go_1_19;
buildGoModule = prev.buildGo118Module;
})
];
};
in {
devShell = pkgs.mkShell {
buildInputs = with pkgs; [ go gopls gotools go-tools golangci-lint];
};
defaultPackage = pkgs.buildGoModule {
pname = "todogo";
inherit version;
src = ./.;
vendorSha256 = "sha256-pQpattmS9VmO3ZIQUFn66az8GSmB4IvYhTTCFn6SUmo=";
};
});
}
Loading…
Cancel
Save