Skyler Turner | 67d911a | 2022-03-17 08:54:58 +0000 | [diff] [blame] | 1 | final: prev: let |
Skyler Turner | 9f74a14 | 2022-03-18 00:14:26 +0000 | [diff] [blame] | 2 | version = "1ba013d3fe54de01c52bd74d98037fe4c0029d6e"; |
| 3 | |
Skyler Turner | 67d911a | 2022-03-17 08:54:58 +0000 | [diff] [blame] | 4 | src = final.fetchFromGitHub { |
| 5 | owner = "winfsp"; |
| 6 | repo = "hubfs"; |
Skyler Turner | 9f74a14 | 2022-03-18 00:14:26 +0000 | [diff] [blame] | 7 | rev = version; |
Skyler Turner | 64f7290 | 2022-03-17 10:48:20 +0000 | [diff] [blame] | 8 | hash = "sha256-R1nCdua0gacXrglQ4AZfxnO3ngVECCKKiUOgp3dWRGg="; |
Skyler Turner | 3f61969 | 2022-03-18 00:02:19 +0000 | [diff] [blame] | 9 | } + "/src"; |
Skyler Turner | 67d911a | 2022-03-17 08:54:58 +0000 | [diff] [blame] | 10 | in { |
Skyler Turner | 3f61969 | 2022-03-18 00:02:19 +0000 | [diff] [blame] | 11 | hubfs = final.buildGoModule { |
Skyler Turner | 9f74a14 | 2022-03-18 00:14:26 +0000 | [diff] [blame] | 12 | inherit src version; |
| 13 | |
Skyler Turner | d5892a9 | 2022-03-17 10:45:47 +0000 | [diff] [blame] | 14 | name = "hubfs"; |
Skyler Turner | 9f74a14 | 2022-03-18 00:14:26 +0000 | [diff] [blame] | 15 | |
Skyler Turner | 0c26177 | 2022-03-17 11:00:04 +0000 | [diff] [blame] | 16 | buildInputs = with final; [ |
Skyler Turner | 3f61969 | 2022-03-18 00:02:19 +0000 | [diff] [blame] | 17 | fuse3 |
Skyler Turner | 9f74a14 | 2022-03-18 00:14:26 +0000 | [diff] [blame] | 18 | fuse |
Skyler Turner | dca1df3 | 2022-03-17 23:57:11 +0000 | [diff] [blame] | 19 | fuse-common |
Skyler Turner | 46fe0bc | 2022-03-18 00:24:39 +0000 | [diff] [blame] | 20 | makeWrapper |
Skyler Turner | 0c26177 | 2022-03-17 11:00:04 +0000 | [diff] [blame] | 21 | ]; |
Skyler Turner | 9f74a14 | 2022-03-18 00:14:26 +0000 | [diff] [blame] | 22 | |
Skyler Turner | 3f61969 | 2022-03-18 00:02:19 +0000 | [diff] [blame] | 23 | checkPhase = ":"; # Bit of a hack here; we need to disable tests as we can't get FUSE inside the build derivation to test the package |
Skyler Turner | 9f74a14 | 2022-03-18 00:14:26 +0000 | [diff] [blame] | 24 | |
Skyler Grey | a130ad6 | 2022-05-31 09:47:34 +0100 | [diff] [blame] | 25 | vendorSha256 = "sha256-sT3H1iFSakLHWKhzRcJz2RXf2Owm+8DQy3h3O8MO2nY="; |
Skyler Turner | 9f74a14 | 2022-03-18 00:14:26 +0000 | [diff] [blame] | 26 | |
Skyler Grey | 737ee56 | 2022-05-31 07:51:55 +0100 | [diff] [blame] | 27 | proxyVendor = true; |
Skyler Turner | 9f74a14 | 2022-03-18 00:14:26 +0000 | [diff] [blame] | 28 | |
| 29 | ldflags = [ |
| 30 | "-X main.GitVersion=${version}" |
| 31 | "-X main.GitVersionFuse=[vendored]" |
| 32 | "-X main.BuildDate=unknown" |
| 33 | ]; |
| 34 | |
| 35 | postInstall = '' |
Skyler Turner | 7a4bfcc | 2022-03-18 00:25:29 +0000 | [diff] [blame] | 36 | wrapProgram $out/bin/hubfs \ |
Skyler Turner | 9f74a14 | 2022-03-18 00:14:26 +0000 | [diff] [blame] | 37 | --suffix PATH : ${final.lib.makeBinPath [ final.fuse final.fuse3 ]} |
Skyler Turner | 7a4bfcc | 2022-03-18 00:25:29 +0000 | [diff] [blame] | 38 | ln -s $out/bin/hubfs $out/bin/mount.fuse.hubfs |
Skyler Turner | 9f74a14 | 2022-03-18 00:14:26 +0000 | [diff] [blame] | 39 | ''; |
| 40 | |
| 41 | meta = with final.lib; { |
| 42 | description = "GitHub as a FUSE mount"; |
| 43 | license = licenses.agpl3; |
| 44 | homepage = "https://github.com/winfsp/hubfs"; |
| 45 | maintainers = with maintainers; [ minion3665 ]; |
| 46 | platforms = platforms.unix; |
| 47 | }; |
Skyler Turner | c2c4811 | 2022-03-17 08:55:27 +0000 | [diff] [blame] | 48 | }; |
Skyler Turner | 67d911a | 2022-03-17 08:54:58 +0000 | [diff] [blame] | 49 | } |