1{
2 lib,
3 buildGoModule,
4 fetchFromGitHub,
5 nix-update-script,
6 writableTmpDirAsHomeHook,
7}:
8let
9 version = "1.3.2";
10 tag = "v${version}";
11in
12buildGoModule {
13 pname = "superfile";
14 inherit version;
15
16 src = fetchFromGitHub {
17 owner = "yorukot";
18 repo = "superfile";
19 inherit tag;
20 hash = "sha256-IzdaOJcwi7+8d8QpTLPJwEhffEz4h0Rdv7APOMcnTHw=";
21 };
22
23 vendorHash = "sha256-sqt0BzJW1nu6gYAhscrXlTAbwIoUY7JAOuzsenHpKEI=";
24
25 ldflags = [
26 "-s"
27 "-w"
28 ];
29
30 nativeCheckInputs = [ writableTmpDirAsHomeHook ];
31
32 # Upstream notes that this could be flakey, and it consistently fails for me.
33 checkFlags = [ "-skip=^TestReturnDirElement/Sort_by_Date$" ];
34
35 passthru.updateScript = nix-update-script { };
36
37 meta = {
38 description = "Pretty fancy and modern terminal file manager";
39 homepage = "https://github.com/yorukot/superfile";
40 changelog = "https://github.com/yorukot/superfile/blob/${tag}/changelog.md";
41 license = lib.licenses.mit;
42 maintainers = with lib.maintainers; [
43 momeemt
44 redyf
45 ];
46 mainProgram = "superfile";
47 };
48}