diff --git a/pkgs/by-name/ht/httpdirfs/package.nix b/pkgs/by-name/ht/httpdirfs/package.nix new file mode 100644 index 000000000000..54d16dbfcbb5 --- /dev/null +++ b/pkgs/by-name/ht/httpdirfs/package.nix @@ -0,0 +1,70 @@ +{ + curl, + expat, + fetchFromGitHub, + fuse, + gumbo, + help2man, + lib, + libuuid, + nix-update-script, + pkg-config, + stdenv, + testers, +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "httpdirfs"; + version = "1.2.5"; + + src = fetchFromGitHub { + owner = "fangfufu"; + repo = "httpdirfs"; + rev = "refs/tags/${finalAttrs.version}"; + sha256 = "sha256-PUYsT0VDEzerPqwrLJrET4kSsWsQhtnfmLepeaqtA+I="; + }; + + postPatch = lib.optional stdenv.isDarwin '' + substituteInPlace Makefile --replace-fail '-fanalyzer' '-Xanalyzer' + ''; + + nativeBuildInputs = [ + help2man + pkg-config + ]; + + buildInputs = [ + curl + expat + fuse + gumbo + libuuid + ]; + + makeFlags = [ "prefix=${placeholder "out"}" ]; + + postBuild = '' + make man + ''; + + passthru = { + # Disabled for Darwin because requires macFUSE installed outside NixOS + tests.version = lib.optionalAttrs stdenv.isLinux ( + testers.testVersion { + command = "${lib.getExe finalAttrs.finalPackage} --version"; + package = finalAttrs.finalPackage; + } + ); + updateScript = nix-update-script { }; + }; + + meta = { + changelog = "https://github.com/fangfufu/httpdirfs/releases/tag/${finalAttrs.version}"; + description = "A FUSE filesystem for HTTP directory listings"; + homepage = "https://github.com/fangfufu/httpdirfs"; + license = lib.licenses.gpl3Only; + mainProgram = "httpdirfs"; + maintainers = with lib.maintainers; [ sbruder schnusch anthonyroussel ]; + platforms = lib.platforms.unix; + }; +}) diff --git a/pkgs/tools/filesystems/httpdirfs/default.nix b/pkgs/tools/filesystems/httpdirfs/default.nix deleted file mode 100644 index 6163e1a0158a..000000000000 --- a/pkgs/tools/filesystems/httpdirfs/default.nix +++ /dev/null @@ -1,27 +0,0 @@ -{ lib, stdenv, fetchFromGitHub, pkg-config, curl, expat, fuse, gumbo, libuuid }: - -stdenv.mkDerivation rec { - pname = "httpdirfs"; - version = "1.2.3"; - - src = fetchFromGitHub { - owner = "fangfufu"; - repo = pname; - rev = version; - sha256 = "sha256-rdeBlAV3t/si9x488tirUGLZRYAxh13zdRIQe0OPd+A="; - }; - - nativeBuildInputs = [ pkg-config ]; - buildInputs = [ curl expat fuse gumbo libuuid ]; - - makeFlags = [ "prefix=${placeholder "out"}" ]; - - meta = with lib; { - description = "A FUSE filesystem for HTTP directory listings"; - homepage = "https://github.com/fangfufu/httpdirfs"; - license = licenses.gpl3Only; - maintainers = with maintainers; [ sbruder schnusch ]; - platforms = platforms.unix; - mainProgram = "httpdirfs"; - }; -} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 5f7d1fa296bb..530ff70ebe0c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -9142,8 +9142,6 @@ with pkgs; http-getter = callPackage ../applications/networking/flent/http-getter.nix { }; - httpdirfs = callPackage ../tools/filesystems/httpdirfs { }; - httpdump = callPackage ../tools/security/httpdump { }; httpie = with python3Packages; toPythonApplication httpie;