diff options
author | AndersonTorres <torres.anderson.85@protonmail.com> | 2021-11-02 22:17:59 -0300 |
---|---|---|
committer | AndersonTorres <torres.anderson.85@protonmail.com> | 2021-11-03 17:06:38 -0300 |
commit | 49466be320a4a791d4c448656965fc139f1fb66f (patch) | |
tree | 6125e2d09fcf4516ab1b77cc8764cb7eb545ffda /pkgs/os-specific/linux/msr | |
parent | bd0b227bc91738d7aed435111c78b2ff8b54c5e6 (diff) | |
download | nixpkgs-49466be320a4a791d4c448656965fc139f1fb66f.tar nixpkgs-49466be320a4a791d4c448656965fc139f1fb66f.tar.gz nixpkgs-49466be320a4a791d4c448656965fc139f1fb66f.tar.bz2 nixpkgs-49466be320a4a791d4c448656965fc139f1fb66f.tar.lz nixpkgs-49466be320a4a791d4c448656965fc139f1fb66f.tar.xz nixpkgs-49466be320a4a791d4c448656965fc139f1fb66f.tar.zst nixpkgs-49466be320a4a791d4c448656965fc139f1fb66f.zip |
msr: init at 20060208
Diffstat (limited to 'pkgs/os-specific/linux/msr')
-rw-r--r-- | pkgs/os-specific/linux/msr/000-include-sysmacros.patch | 11 | ||||
-rw-r--r-- | pkgs/os-specific/linux/msr/default.nix | 40 |
2 files changed, 51 insertions, 0 deletions
diff --git a/pkgs/os-specific/linux/msr/000-include-sysmacros.patch b/pkgs/os-specific/linux/msr/000-include-sysmacros.patch new file mode 100644 index 00000000000..5fa96cd1469 --- /dev/null +++ b/pkgs/os-specific/linux/msr/000-include-sysmacros.patch @@ -0,0 +1,11 @@ +diff -Naur msr-old/msr.c msr-20060208/msr.c +--- msr-old/msr.c 1969-12-31 21:00:01.000000000 -0300 ++++ msr-20060208/msr.c 2021-11-02 21:19:34.576722617 -0300 +@@ -19,6 +19,7 @@ + #include <stdio.h> + #include <sys/types.h> + #include <sys/stat.h> ++#include <sys/sysmacros.h> + #include <fcntl.h> + #include <errno.h> + #include <unistd.h> diff --git a/pkgs/os-specific/linux/msr/default.nix b/pkgs/os-specific/linux/msr/default.nix new file mode 100644 index 00000000000..0ffc4601209 --- /dev/null +++ b/pkgs/os-specific/linux/msr/default.nix @@ -0,0 +1,40 @@ +{ lib +, stdenv +, fetchzip +, installShellFiles +}: + +stdenv.mkDerivation rec { + pname = "msr"; + version = "20060208"; + + src = fetchzip { + name = "${pname}-${version}"; + url = "http://www.etallen.com/msr/${pname}-${version}.src.tar.gz"; + hash = "sha256-e01qYWbOALkXp5NpexuVodMxA3EBySejJ6ZBpZjyT+E="; + }; + + nativeBuildInputs = [ + installShellFiles + ]; + + patches = [ + ./000-include-sysmacros.patch + ]; + + installPhase = '' + runHook preInstall + mkdir -p $out/bin/ + cp msr $out/bin/ + installManPage msr.man + runHook postInstall + ''; + + meta = with lib; { + homepage = "http://www.etallen.com/msr.html"; + description = "Linux tool to display or modify x86 model-specific registers (MSRs)"; + license = licenses.bsd0; + maintainers = with maintainers; [ AndersonTorres ]; + platforms = [ "i686-linux" "x86_64-linux" ]; + }; +} |