From 699404bafe26902aa4115225d42c47902e5e2da9 Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Mallo Date: Thu, 18 Mar 2021 20:03:44 +0100 Subject: [PATCH] bsc: add cpuid program --- bsc/cpuid/default.nix | 21 +++++++++++++++++++++ overlay.nix | 1 + 2 files changed, 22 insertions(+) create mode 100644 bsc/cpuid/default.nix diff --git a/bsc/cpuid/default.nix b/bsc/cpuid/default.nix new file mode 100644 index 0000000..30b9edc --- /dev/null +++ b/bsc/cpuid/default.nix @@ -0,0 +1,21 @@ +{ + stdenv +, perl # For the pod2man command +}: + +stdenv.mkDerivation rec { + version = "20201006"; + pname = "cpuid"; + + buildInputs = [ perl ]; + + # Replace /usr install directory for $out + postPatch = '' + sed -i "s@/usr@$out@g" Makefile + ''; + + src = builtins.fetchTarball { + url = "http://www.etallen.com/cpuid/${pname}-${version}.src.tar.gz"; + sha256 = "04qhs938gs1kjxpsrnfy6lbsircsprfyh4db62s5cf83a1nrwn9w"; + }; +} diff --git a/overlay.nix b/overlay.nix index 8e4b01a..75c1881 100644 --- a/overlay.nix +++ b/overlay.nix @@ -197,6 +197,7 @@ let dummy = callPackage ./bsc/dummy/default.nix { }; mpptest = callPackage ./bsc/mpptest/default.nix { }; + cpuid = callPackage ./bsc/cpuid/default.nix { }; # ================================================================= # Garlic benchmark