nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 buildGoModule,
5 fetchFromGitHub,
6 nix-update-script,
7 writableTmpDirAsHomeHook,
8 exiftool,
9}:
10let
11 version = "1.3.3";
12 tag = "v${version}";
13in
14buildGoModule {
15 pname = "superfile";
16 inherit version;
17
18 src = fetchFromGitHub {
19 owner = "yorukot";
20 repo = "superfile";
21 inherit tag;
22 hash = "sha256-A1SWsBcPtGNbSReslp5L3Gg4hy3lDSccqGxFpLfVPrk=";
23 };
24
25 vendorHash = "sha256-sqt0BzJW1nu6gYAhscrXlTAbwIoUY7JAOuzsenHpKEI=";
26
27 ldflags = [
28 "-s"
29 "-w"
30 ];
31
32 nativeBuildInputs = [ exiftool ];
33
34 nativeCheckInputs = [ writableTmpDirAsHomeHook ];
35
36 # Upstream notes that this could be flaky, and it consistently fails for me.
37 checkFlags = [
38 "-skip=^TestReturnDirElement/Sort_by_Date$"
39 ]
40 ++ lib.optionals stdenv.isDarwin [
41 # Only failing on nix darwin. I suspect this is due to the way
42 # darwin handles file permissions.
43 "-skip=^TestCompressSelectedFiles"
44 ];
45
46 passthru.updateScript = nix-update-script { };
47
48 meta = {
49 description = "Pretty fancy and modern terminal file manager";
50 homepage = "https://github.com/yorukot/superfile";
51 changelog = "https://github.com/yorukot/superfile/blob/${tag}/changelog.md";
52 license = lib.licenses.mit;
53 maintainers = with lib.maintainers; [
54 momeemt
55 redyf
56 ];
57 mainProgram = "superfile";
58 };
59}