about summary refs log tree commit diff
path: root/pkgs/by-name/fi
diff options
context:
space:
mode:
authorSigmanificient <edhyjox@gmail.com>2024-05-15 11:56:57 +0200
committerSigmanificient <edhyjox@gmail.com>2024-05-24 08:07:40 +0200
commite37e42f5b64591af53699e07544c01b43aa4ffa2 (patch)
treef96ae4b7b299a17766ff9869e62a246a7145572f /pkgs/by-name/fi
parent030938f1cdc0671cca7fabb18f2e9cc9a3045876 (diff)
filterpath: init at 1.0.1
Diffstat (limited to 'pkgs/by-name/fi')
-rw-r--r--pkgs/by-name/fi/filterpath/package.nix39
1 files changed, 39 insertions, 0 deletions
diff --git a/pkgs/by-name/fi/filterpath/package.nix b/pkgs/by-name/fi/filterpath/package.nix
new file mode 100644
index 0000000000000..32620f7987c1b
--- /dev/null
+++ b/pkgs/by-name/fi/filterpath/package.nix
@@ -0,0 +1,39 @@
+{
+  stdenv,
+  fetchFromGitHub,
+  lib,
+}:
+stdenv.mkDerivation (finalAttrs: {
+  name = "filterpath";
+  version = "1.0.1";
+
+  src = fetchFromGitHub {
+    owner = "Sigmanificient";
+    repo = "filterpath";
+    rev = finalAttrs.version;
+    hash = "sha256-vagIImWQQRigMYW12lw+Eg37JJ2yO/V5jq4wD3q4yy8=";
+  };
+
+  makeFlags = [
+    "CC=cc"
+    "PREFIX=${placeholder "out"}/bin"
+  ];
+
+  doCheck = true;
+  checkPhase = ''
+    runHook preCheck
+
+    echo "[`pwd`]" | ./filterpath | grep "`pwd`"
+
+    runHook postCheck
+  '';
+
+  meta = {
+    homepage = "https://github.com/Sigmanificient/filterpath";
+    description = "Retrieve a valid path from a messy piped line";
+    license = lib.licenses.gpl3Only;
+    maintainers = with lib.maintainers; [ sigmanificient ];
+    mainProgram = "filterpath";
+    platforms = lib.platforms.linux;
+  };
+})