summary refs log tree commit diff
path: root/pkgs/tools/system
diff options
context:
space:
mode:
authorFrederik Rietdijk <fridh@fridh.nl>2020-01-06 12:01:12 +0100
committerFrederik Rietdijk <fridh@fridh.nl>2020-01-06 12:01:12 +0100
commit4a91444aa81c6c5b002facf453ff5fbc524177e1 (patch)
tree7fce9f6c10b0ab59317583a59ddf70cc24a7d02a /pkgs/tools/system
parent8fff915659d3aafec55f07be2b0e2f500e96109d (diff)
parent17ab5f9d88b3b4e8442421bc4bf4eb1e913bcc6a (diff)
downloadnixpkgs-4a91444aa81c6c5b002facf453ff5fbc524177e1.tar
nixpkgs-4a91444aa81c6c5b002facf453ff5fbc524177e1.tar.gz
nixpkgs-4a91444aa81c6c5b002facf453ff5fbc524177e1.tar.bz2
nixpkgs-4a91444aa81c6c5b002facf453ff5fbc524177e1.tar.lz
nixpkgs-4a91444aa81c6c5b002facf453ff5fbc524177e1.tar.xz
nixpkgs-4a91444aa81c6c5b002facf453ff5fbc524177e1.tar.zst
nixpkgs-4a91444aa81c6c5b002facf453ff5fbc524177e1.zip
Merge staging-next into staging
Diffstat (limited to 'pkgs/tools/system')
-rw-r--r--pkgs/tools/system/uefitool/common.nix39
-rw-r--r--pkgs/tools/system/uefitool/variants.nix15
2 files changed, 54 insertions, 0 deletions
diff --git a/pkgs/tools/system/uefitool/common.nix b/pkgs/tools/system/uefitool/common.nix
new file mode 100644
index 00000000000..7d5ee82dcf9
--- /dev/null
+++ b/pkgs/tools/system/uefitool/common.nix
@@ -0,0 +1,39 @@
+{ version, sha256, installFiles }:
+{ lib, mkDerivation, fetchFromGitHub, qtbase, qmake, cmake, zip }:
+
+mkDerivation rec {
+  passthru = {
+    inherit version;
+    inherit sha256;
+    inherit installFiles;
+  };
+  pname = "uefitool";
+  inherit version;
+
+  src = fetchFromGitHub {
+    inherit sha256;
+    owner = "LongSoft";
+    repo = pname;
+    rev = version;
+  };
+
+  buildInputs = [ qtbase ];
+  nativeBuildInputs = [ qmake cmake zip ];
+
+  configurePhase = ":";
+  buildPhase = "bash unixbuild.sh";
+
+  installPhase = ''
+    mkdir -p "$out"/bin
+    cp ${lib.concatStringsSep " " installFiles} "$out"/bin
+  '';
+
+  meta = with lib; {
+    description = "UEFI firmware image viewer and editor";
+    homepage = "https://github.com/LongSoft/uefitool";
+    license = licenses.bsd2;
+    maintainers = with maintainers; [ ajs124 ];
+    # uefitool supposedly works on other platforms, but their build script only works on linux in nixpkgs
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/tools/system/uefitool/variants.nix b/pkgs/tools/system/uefitool/variants.nix
new file mode 100644
index 00000000000..cced17e6ddd
--- /dev/null
+++ b/pkgs/tools/system/uefitool/variants.nix
@@ -0,0 +1,15 @@
+{ libsForQt5 }:
+let
+  common = opts: libsForQt5.callPackage (import ./common.nix opts) {};
+in rec {
+  new-engine = common rec {
+    version = "A56";
+    sha256 = "0sxmjkrwcchxg2qmcjsw2vr42s7cdcg2fxkwb8axq2r2z23465gp";
+    installFiles = [ "UEFITool/UEFITool" "UEFIFind/UEFIFind" "UEFIExtract/UEFIExtract" ];
+  };
+  old-engine = common rec {
+    version = "0.27.0";
+    sha256 = "1i1p823qld927p4f1wcphqcnivb9mq7fi5xmzibxc3g9zzgnyc2h";
+    installFiles = [ "UEFITool" "UEFIReplace/UEFIReplace" "UEFIPatch/UEFIPatch" ];
+  };
+}