mirror of https://git.sr.ht/~statianzo/todogo
commit
5326aad792
@ -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…
Reference in new issue