aboutsummaryrefslogtreecommitdiff
path: root/infra/corenix/pkgs/coreboot-payload-tint/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'infra/corenix/pkgs/coreboot-payload-tint/default.nix')
-rw-r--r--infra/corenix/pkgs/coreboot-payload-tint/default.nix24
1 files changed, 24 insertions, 0 deletions
diff --git a/infra/corenix/pkgs/coreboot-payload-tint/default.nix b/infra/corenix/pkgs/coreboot-payload-tint/default.nix
new file mode 100644
index 000000000000..b953c773336d
--- /dev/null
+++ b/infra/corenix/pkgs/coreboot-payload-tint/default.nix
@@ -0,0 +1,24 @@
+{ coreboot, stdenv, fetchurl }:
+
+# the original tint does not support building as a coreboot payload
+# the patches from the coreboot repo require building tint in-tree
+# this makes everything a bit more complicated here
+
+stdenv.mkDerivation rec {
+ pname = "coreboot-payload-tint";
+ version = "0.04+nmu1";
+ inherit (coreboot.drvAttrs) src postPatch;
+
+ preConfigure = "cd payloads/external/tint";
+ preBuild = ''
+ tar -xf ${
+ fetchurl {
+ url =
+ "https://mirror.fsf.org/trisquel/pool/main/t/tint/tint_${version}.tar.gz";
+ sha256 = "17gbga1lha9yp5hpyr5vn1sc93fx413cksxmpyl8zv3b5rjvzsy1";
+ }
+ }
+ mv tint{-${version},}
+ '';
+ installPhase = "install -D tint/tint.elf -t $out";
+}