mirror of https://git.sr.ht/~statianzo/todogo
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
977 B
40 lines
977 B
2 years ago
|
{
|
||
|
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=";
|
||
|
};
|
||
|
});
|
||
|
}
|