From b65cd9bb4df254b62fb7a97d175f1a5792505c11 Mon Sep 17 00:00:00 2001 From: Anthony Roussel Date: Sat, 30 Mar 2024 16:36:11 +0100 Subject: [PATCH 1/5] httpdirfs: format with nixfmt-rfc-style --- pkgs/tools/filesystems/httpdirfs/default.nix | 31 +++++++++++++++----- 1 file changed, 24 insertions(+), 7 deletions(-) diff --git a/pkgs/tools/filesystems/httpdirfs/default.nix b/pkgs/tools/filesystems/httpdirfs/default.nix index 6163e1a0158a..1d4952edcbf9 100644 --- a/pkgs/tools/filesystems/httpdirfs/default.nix +++ b/pkgs/tools/filesystems/httpdirfs/default.nix @@ -1,4 +1,14 @@ -{ lib, stdenv, fetchFromGitHub, pkg-config, curl, expat, fuse, gumbo, libuuid }: +{ + curl, + expat, + fetchFromGitHub, + fuse, + gumbo, + lib, + libuuid, + pkg-config, + stdenv, +}: stdenv.mkDerivation rec { pname = "httpdirfs"; @@ -7,21 +17,28 @@ stdenv.mkDerivation rec { src = fetchFromGitHub { owner = "fangfufu"; repo = pname; - rev = version; + rev = "refs/tags/${version}"; sha256 = "sha256-rdeBlAV3t/si9x488tirUGLZRYAxh13zdRIQe0OPd+A="; }; nativeBuildInputs = [ pkg-config ]; - buildInputs = [ curl expat fuse gumbo libuuid ]; + + buildInputs = [ + curl + expat + fuse + gumbo + libuuid + ]; makeFlags = [ "prefix=${placeholder "out"}" ]; - meta = with lib; { + meta = { 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; + license = lib.licenses.gpl3Only; mainProgram = "httpdirfs"; + maintainers = with lib.maintainers; [ sbruder schnusch ]; + platforms = lib.platforms.unix; }; } From 2ebe93cb8caf8c07efaa8d8723503c6c4028cc8d Mon Sep 17 00:00:00 2001 From: Anthony Roussel Date: Sat, 30 Mar 2024 16:39:19 +0100 Subject: [PATCH 2/5] httpdirfs: add passthru.{tests.version,updateScript} --- pkgs/tools/filesystems/httpdirfs/default.nix | 21 ++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/pkgs/tools/filesystems/httpdirfs/default.nix b/pkgs/tools/filesystems/httpdirfs/default.nix index 1d4952edcbf9..caf75a26b74c 100644 --- a/pkgs/tools/filesystems/httpdirfs/default.nix +++ b/pkgs/tools/filesystems/httpdirfs/default.nix @@ -6,18 +6,20 @@ gumbo, lib, libuuid, + nix-update-script, pkg-config, stdenv, + testers, }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "httpdirfs"; version = "1.2.3"; src = fetchFromGitHub { owner = "fangfufu"; - repo = pname; - rev = "refs/tags/${version}"; + repo = "httpdirfs"; + rev = "refs/tags/${finalAttrs.version}"; sha256 = "sha256-rdeBlAV3t/si9x488tirUGLZRYAxh13zdRIQe0OPd+A="; }; @@ -33,6 +35,17 @@ stdenv.mkDerivation rec { makeFlags = [ "prefix=${placeholder "out"}" ]; + 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 = { description = "A FUSE filesystem for HTTP directory listings"; homepage = "https://github.com/fangfufu/httpdirfs"; @@ -41,4 +54,4 @@ stdenv.mkDerivation rec { maintainers = with lib.maintainers; [ sbruder schnusch ]; platforms = lib.platforms.unix; }; -} +}) From 00632e239431b7e845fb7f20d0e0933fbc65caf7 Mon Sep 17 00:00:00 2001 From: Anthony Roussel Date: Sat, 30 Mar 2024 16:48:46 +0100 Subject: [PATCH 3/5] httpdirfs: 1.2.3 -> 1.2.5 https://github.com/fangfufu/httpdirfs/compare/1.2.3...1.2.5 https://github.com/fangfufu/httpdirfs/releases/tag/1.2.5 https://github.com/fangfufu/httpdirfs/releases/tag/1.2.4 --- pkgs/tools/filesystems/httpdirfs/default.nix | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/filesystems/httpdirfs/default.nix b/pkgs/tools/filesystems/httpdirfs/default.nix index caf75a26b74c..ea0f1a4ac4ee 100644 --- a/pkgs/tools/filesystems/httpdirfs/default.nix +++ b/pkgs/tools/filesystems/httpdirfs/default.nix @@ -4,6 +4,7 @@ fetchFromGitHub, fuse, gumbo, + help2man, lib, libuuid, nix-update-script, @@ -14,16 +15,23 @@ stdenv.mkDerivation (finalAttrs: { pname = "httpdirfs"; - version = "1.2.3"; + version = "1.2.5"; src = fetchFromGitHub { owner = "fangfufu"; repo = "httpdirfs"; rev = "refs/tags/${finalAttrs.version}"; - sha256 = "sha256-rdeBlAV3t/si9x488tirUGLZRYAxh13zdRIQe0OPd+A="; + sha256 = "sha256-PUYsT0VDEzerPqwrLJrET4kSsWsQhtnfmLepeaqtA+I="; }; - nativeBuildInputs = [ pkg-config ]; + postPatch = lib.optional stdenv.isDarwin '' + substituteInPlace Makefile --replace-fail '-fanalyzer' '-Xanalyzer' + ''; + + nativeBuildInputs = [ + help2man + pkg-config + ]; buildInputs = [ curl @@ -35,6 +43,10 @@ stdenv.mkDerivation (finalAttrs: { makeFlags = [ "prefix=${placeholder "out"}" ]; + postBuild = '' + make man + ''; + passthru = { # Disabled for Darwin because requires macFUSE installed outside NixOS tests.version = lib.optionalAttrs stdenv.isLinux ( @@ -47,6 +59,7 @@ stdenv.mkDerivation (finalAttrs: { }; 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; From 4bc9e0221b2e942087a987f622f3ef3d1b4e649a Mon Sep 17 00:00:00 2001 From: Anthony Roussel Date: Sat, 30 Mar 2024 16:48:57 +0100 Subject: [PATCH 4/5] httpdirfs: add anthonyroussel to maintainers --- pkgs/tools/filesystems/httpdirfs/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/tools/filesystems/httpdirfs/default.nix b/pkgs/tools/filesystems/httpdirfs/default.nix index ea0f1a4ac4ee..54d16dbfcbb5 100644 --- a/pkgs/tools/filesystems/httpdirfs/default.nix +++ b/pkgs/tools/filesystems/httpdirfs/default.nix @@ -64,7 +64,7 @@ stdenv.mkDerivation (finalAttrs: { homepage = "https://github.com/fangfufu/httpdirfs"; license = lib.licenses.gpl3Only; mainProgram = "httpdirfs"; - maintainers = with lib.maintainers; [ sbruder schnusch ]; + maintainers = with lib.maintainers; [ sbruder schnusch anthonyroussel ]; platforms = lib.platforms.unix; }; }) From 3de8f433e235e16ebc53f8198f381347efc2168b Mon Sep 17 00:00:00 2001 From: Anthony Roussel Date: Sat, 30 Mar 2024 17:13:30 +0100 Subject: [PATCH 5/5] httpdirfs: move to pkgs/by-name --- .../httpdirfs/default.nix => by-name/ht/httpdirfs/package.nix} | 0 pkgs/top-level/all-packages.nix | 2 -- 2 files changed, 2 deletions(-) rename pkgs/{tools/filesystems/httpdirfs/default.nix => by-name/ht/httpdirfs/package.nix} (100%) diff --git a/pkgs/tools/filesystems/httpdirfs/default.nix b/pkgs/by-name/ht/httpdirfs/package.nix similarity index 100% rename from pkgs/tools/filesystems/httpdirfs/default.nix rename to pkgs/by-name/ht/httpdirfs/package.nix diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index e5b454bfcb0e..82e86a03ee96 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -9154,8 +9154,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;