summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules/cpu
diff options
context:
space:
mode:
authorBen Darwin <bcdarwin@gmail.com>2019-12-26 17:30:49 -0500
committerBen Darwin <bcdarwin@gmail.com>2019-12-26 17:30:49 -0500
commitf1958523e313174e25345c69b2f127b086ffafd1 (patch)
tree7942c47ef630535e2f1809127647e96678759f32 /pkgs/development/ocaml-modules/cpu
parent0afebfeb5a6ab380d56bb2f6e38a362a02f8d4b8 (diff)
downloadnixpkgs-f1958523e313174e25345c69b2f127b086ffafd1.tar
nixpkgs-f1958523e313174e25345c69b2f127b086ffafd1.tar.gz
nixpkgs-f1958523e313174e25345c69b2f127b086ffafd1.tar.bz2
nixpkgs-f1958523e313174e25345c69b2f127b086ffafd1.tar.lz
nixpkgs-f1958523e313174e25345c69b2f127b086ffafd1.tar.xz
nixpkgs-f1958523e313174e25345c69b2f127b086ffafd1.tar.zst
nixpkgs-f1958523e313174e25345c69b2f127b086ffafd1.zip
ocamlPackages.cpu: setcore 1.0.1 -> cpu 2.0.0
Diffstat (limited to 'pkgs/development/ocaml-modules/cpu')
-rw-r--r--pkgs/development/ocaml-modules/cpu/default.nix29
1 files changed, 29 insertions, 0 deletions
diff --git a/pkgs/development/ocaml-modules/cpu/default.nix b/pkgs/development/ocaml-modules/cpu/default.nix
new file mode 100644
index 00000000000..716e40e16e9
--- /dev/null
+++ b/pkgs/development/ocaml-modules/cpu/default.nix
@@ -0,0 +1,29 @@
+{ stdenv, buildDunePackage, fetchFromGitHub, autoconf }:
+
+buildDunePackage rec {
+  pname = "cpu";
+  version = "2.0.0";
+
+  src = fetchFromGitHub {
+    owner = "UnixJunkie";
+    repo   = pname;
+    rev    = "v${version}";
+    sha256 = "1vir6gh1bhvxgj2fcn69c38yhw3jgk7dyikmw789m5ld2csnyjiv";
+  };
+
+  preConfigure = ''
+    autoconf
+    autoheader
+  '';
+
+  buildInputs = [ autoconf ];
+
+  hardeningDisable = stdenv.lib.optional stdenv.isDarwin "strictoverflow";
+
+  meta = with stdenv.lib; {
+    inherit (src.meta) homepage;
+    description = "Core pinning library";
+    maintainers = [ maintainers.bcdarwin ];
+    license = licenses.lgpl2;
+  };
+}