summary refs log tree commit diff
path: root/pkgs/development/libraries/argp-standalone
diff options
context:
space:
mode:
authorAmar1729 <amar.paul16@gmail.com>2018-10-20 01:52:11 -0400
committerAmar1729 <amar.paul16@gmail.com>2018-10-20 02:38:46 -0400
commitd87a5c872218d0f179ae13319079bfea918f7d7f (patch)
tree8a598f464ce457e7484b3716cb77551e1f3a8ef9 /pkgs/development/libraries/argp-standalone
parentceb0ce849fe01fcbc221e3b978a0744bf3735752 (diff)
downloadnixpkgs-d87a5c872218d0f179ae13319079bfea918f7d7f.tar
nixpkgs-d87a5c872218d0f179ae13319079bfea918f7d7f.tar.gz
nixpkgs-d87a5c872218d0f179ae13319079bfea918f7d7f.tar.bz2
nixpkgs-d87a5c872218d0f179ae13319079bfea918f7d7f.tar.lz
nixpkgs-d87a5c872218d0f179ae13319079bfea918f7d7f.tar.xz
nixpkgs-d87a5c872218d0f179ae13319079bfea918f7d7f.tar.zst
nixpkgs-d87a5c872218d0f179ae13319079bfea918f7d7f.zip
argp-standalone: init at 1.3
Diffstat (limited to 'pkgs/development/libraries/argp-standalone')
-rw-r--r--pkgs/development/libraries/argp-standalone/default.nix41
1 files changed, 41 insertions, 0 deletions
diff --git a/pkgs/development/libraries/argp-standalone/default.nix b/pkgs/development/libraries/argp-standalone/default.nix
new file mode 100644
index 00000000000..f14c77f666b
--- /dev/null
+++ b/pkgs/development/libraries/argp-standalone/default.nix
@@ -0,0 +1,41 @@
+{ stdenv, fetchurl, fetchpatch }:
+
+stdenv.mkDerivation rec {
+  name = "argp-standalone-1.3";
+
+  src = fetchurl {
+    url = "https://www.lysator.liu.se/~nisse/misc/argp-standalone-1.3.tar.gz";
+    sha256 = "dec79694da1319acd2238ce95df57f3680fea2482096e483323fddf3d818d8be";
+  };
+
+  patches = [
+    (if stdenv.hostPlatform.isDarwin then
+    fetchpatch {
+      name = "patch-argp-fmtstream.h";
+      url = "https://raw.githubusercontent.com/Homebrew/formula-patches/b5f0ad3/argp-standalone/patch-argp-fmtstream.h";
+      sha256 = "5656273f622fdb7ca7cf1f98c0c9529bed461d23718bc2a6a85986e4f8ed1cb8";
+    }
+    else null)
+  ];
+
+  patchFlags = "-p0";
+
+  postInstall = 
+    ''
+      mkdir -p $out/lib $out/include
+      cp libargp.a $out/lib
+      cp argp.h $out/include
+    '';
+
+  doCheck = true;
+
+  enableParallelBuilding = true;
+
+  meta = with stdenv.lib; {
+    homepage = "https://www.lysator.liu.se/~nisse/misc/";
+    description = "Standalone version of arguments parsing functions from GLIBC";
+    platforms = platforms.darwin;
+    maintainers = with maintainers; [ amar1729 ];
+    license = stdenv.lib.licenses.gpl2;
+  };
+}