Copy from https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/filesystems/gocryptfs/default.nix
diff --git a/src/apps/personal/overlays/hubfs.nix b/src/apps/personal/overlays/hubfs.nix
index 4f92860..efc8d00 100644
--- a/src/apps/personal/overlays/hubfs.nix
+++ b/src/apps/personal/overlays/hubfs.nix
@@ -1,21 +1,48 @@
final: prev: let
+ version = "1ba013d3fe54de01c52bd74d98037fe4c0029d6e";
+
src = final.fetchFromGitHub {
owner = "winfsp";
repo = "hubfs";
- rev = "1ba013d3fe54de01c52bd74d98037fe4c0029d6e";
+ rev = version;
hash = "sha256-R1nCdua0gacXrglQ4AZfxnO3ngVECCKKiUOgp3dWRGg=";
} + "/src";
in {
hubfs = final.buildGoModule {
+ inherit src version;
+
name = "hubfs";
+
buildInputs = with final; [
- fuse
fuse3
+ fuse
fuse-common
];
+
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
- inherit src;
+
vendorSha256 = "sha256-Fpa+wanlMIqxkEZ3JQdCT4ixuNBj7AquG2+wLuO5TQU=";
+
runVend = true;
+
+ ldflags = [
+ "-X main.GitVersion=${version}"
+ "-X main.GitVersionFuse=[vendored]"
+ "-X main.BuildDate=unknown"
+ ];
+
+ postInstall = ''
+ wrapProgram $out/bin/gocryptfs \
+ --suffix PATH : ${final.lib.makeBinPath [ final.fuse final.fuse3 ]}
+ ln -s $out/bin/gocryptfs $out/bin/mount.fuse.gocryptfs
+ '';
+
+ meta = with final.lib; {
+ description = "GitHub as a FUSE mount";
+ license = licenses.agpl3;
+ homepage = "https://github.com/winfsp/hubfs";
+ maintainers = with maintainers; [ minion3665 ];
+ platforms = platforms.unix;
+ };
};
}
diff --git a/src/apps/personal/overlays/maintainers.nix b/src/apps/personal/overlays/maintainers.nix
new file mode 100644
index 0000000..908cfcf
--- /dev/null
+++ b/src/apps/personal/overlays/maintainers.nix
@@ -0,0 +1,10 @@
+final: prev: {
+ lib = prev.lib {
+ maintainers.minion3665 = {
+ email = "skyler3665@gmail.com";
+ github = "minion3665";
+ githubId = 34243578;
+ name = "Skyler Grey";
+ };
+ }
+}