Skip to content

Commit fe43ce5

Browse files
authored
Drop revision (#8)
1 parent e1f3748 commit fe43ce5

File tree

2 files changed

+23
-36
lines changed

2 files changed

+23
-36
lines changed

flake.nix

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,7 @@
4141
packages =
4242
forAllSystems
4343
({pkgs}: rec {
44-
default = pkgs.callPackage ./modupdate.nix {
45-
self = self;
46-
};
44+
default = pkgs.callPackage ./modupdate.nix {};
4745

4846
# NOTE: Do not use this, it's just an example for my own use
4947
container = pkgs.callPackage ./container.nix {

modupdate.nix

Lines changed: 22 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,28 @@
11
{
22
buildGoModule,
33
lib,
4-
self,
5-
}: let
6-
gitRev =
7-
if (self ? rev)
8-
then self.rev
9-
else "dirty";
10-
in
11-
buildGoModule {
4+
}:
5+
buildGoModule {
6+
name = "modupdate";
7+
src = builtins.path {
128
name = "modupdate";
13-
src = builtins.path {
14-
name = "modupdate";
15-
path = ./.;
16-
filter = path: type:
17-
builtins.elem (/. + path) [
18-
./go.mod
19-
./go.sum
20-
./main.go
21-
./version.go
22-
];
23-
};
24-
vendorSha256 = "sha256-XU4kLbEAPCL8mNk4omk2OIijKdiiAsJKBfoKkJJfHkI=";
9+
path = ./.;
10+
filter = path: type:
11+
builtins.elem (/. + path) [
12+
./go.mod
13+
./go.sum
14+
./main.go
15+
./version.go
16+
];
17+
};
18+
vendorSha256 = "sha256-XU4kLbEAPCL8mNk4omk2OIijKdiiAsJKBfoKkJJfHkI=";
2519

26-
ldflags = [
27-
"-s"
28-
"-w"
29-
"-X 'main.version=${self.shortRev or ""}'"
30-
"-X 'main.vcsCommit=${gitRev}'"
31-
];
20+
ldflags = ["-s" "-w"];
3221

33-
meta = with lib; {
34-
description = "Tool to update direct dependencies in go.mod";
35-
homepage = "https://github.com/knightpp/modupdate";
36-
license = licenses.mit;
37-
maintainers = with maintainers; [knightpp];
38-
};
39-
}
22+
meta = with lib; {
23+
description = "Tool to update direct dependencies in go.mod";
24+
homepage = "https://github.com/knightpp/modupdate";
25+
license = licenses.mit;
26+
maintainers = with maintainers; [knightpp];
27+
};
28+
}

0 commit comments

Comments
 (0)