Browse Source

ports: extract port version from the Genode sources

remotes/praha/master
Emery Hemingway 1 year ago
parent
commit
60473079e8
  1. 21
      packages/genodelabs/default.nix
  2. 13
      packages/genodelabs/openssl.patch
  3. 35
      packages/genodelabs/ports.nix

21
packages/genodelabs/default.nix

@ -40,7 +40,16 @@ let
substituteInPlace tool/check_abi \
--replace "exec nm" "exec ${toolPrefix}nm"
'';
dontBuild = true;
buildPhase = ''
echo { >> ports.nix
find repos/*/ports -name '*.hash' | while read hashFile
do
echo " $(basename --suffix=.hash $hashFile) = \"$(cut -c -6 $hashFile)\";" >> ports.nix
done
echo } >> ports.nix
'';
installPhase = "cp -a . $out";
};
@ -53,12 +62,13 @@ let
{ hash ? "sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="
, patches ? [ ], ... }@args:
let havePatches = patches != [ ];
version = builtins.getAttr name (import "${genodeSources}/ports.nix");
in stdenvNoCC.mkDerivation (args // {
name = name + "-port-" + version;
inherit version patches;
preferLocalBuild = true;
outputHashMode = "recursive";
outputHash = hash;
pname = name;
inherit (genodeSources) version;
inherit patches;
GIT_SSL_CAINFO = "${cacert}/etc/ssl/certs/ca-bundle.crt";
VERBOSE = "";
@ -83,7 +93,7 @@ let
export CONTRIB_DIR=$NIX_BUILD_TOP/contrib
export GENODE_DIR=${if havePatches then "$(pwd)" else genodeSources}
mkdir $CONTRIB_DIR
$GENODE_DIR/tool/ports/prepare_port $pname CHECK_HASH=no
$GENODE_DIR/tool/ports/prepare_port ${name} CHECK_HASH=no
runHook postBuild
'';
@ -96,6 +106,7 @@ let
find $CONTRIB_DIR/* -name .svn -exec rm -rf {} \; || true
find $CONTRIB_DIR/* -name '*.t?z' -exec rm -rf {} \; || true
find $CONTRIB_DIR/* -name '*.tar.*' -exec rm -rf {} \; || true
find $CONTRIB_DIR/* -name '*.zip' -exec rm -rf {} \; || true
mkdir $out
cp -a $CONTRIB_DIR/* $out/

13
packages/genodelabs/openssl.patch

@ -1,13 +0,0 @@
diff --git a/repos/libports/ports/openssl.port b/repos/libports/ports/openssl.port
index 7cdb34b07a..081a6a9a54 100644
--- a/repos/libports/ports/openssl.port
+++ b/repos/libports/ports/openssl.port
@@ -2,7 +2,7 @@ LICENSE := OpenSSL
VERSION := 1.0.2q
DOWNLOADS := openssl.archive
-URL(openssl) := https://www.openssl.org/source/openssl-$(VERSION).tar.gz
+URL(openssl) := https://www.openssl.org/source/old/1.0.2/openssl-1.0.2q.tar.gz
SHA(openssl) := 5744cfcbcec2b1b48629f7354203bc1e5e9b5466998bbccc5b5fcde3b18eb684
DIR(openssl) := src/lib/openssl

35
packages/genodelabs/ports.nix

@ -1,43 +1,38 @@
# ports are superficially similar to Nix, but inferior in every way
{ buildPackages }:
with buildPackages; {
dde_bsd.hash = "sha256-2ilZs6JkcQAvU/sQYnHunGtGRZDt7qLTpKZxQxSOf2I=";
dde_ipxe.hash = "sha256-uK110Cr01D6I2Fo0ZNP5U7rheseuH7LsghSPdFaGU3k=";
dde_linux.hash = "sha256-3G5Mprv9ZBNhDJRuVF6Nrkp3KbFaN10IKFq0OdyAY9M=";
dde_ipxe.hash = "sha256-7J8Loy3e79LAAARQgNixN4NT8lUktgkvl3tZQK+OlMM=";
dde_linux.hash = "sha256-ePNLGyr9A9udzuV5RPaQYjCDc/yns89Yp3h7vQkeBg4=";
dde_rump = {
hash = "sha256-Wr5otGkWEa+5xImsFHQzwap5LckNEbyWA/7xbNcOreI=";
nativeBuildInputs = [ subversion ];
patches = [ ./svn-trust-server-cert.patch ];
};
expat.hash = "sha256-6Kz8qHmSg9/r+o3UJX8ZyB5aDjmfrbsUW/TppbB16jk=";
expat.hash = "sha256-wkqqtYTctVLYZoYbFP1iWL0Xx/mMec40gVxk9amSywU=";
jitterentropy.hash = "sha256-6KS732GxtUMz0xPYKtshdn039DgdJq11vTDQesZn4Ds=";
jpeg.hash = "sha256-fiRwzwEDVd1Xgd+k4WOez8AfR4brsBg7g0D9+9VJZr4=";
jpeg.hash = "sha256-NRcaGchA0DH2g5OkWBOiFK5co6lMpAo1ELqtxRUR3do=";
libc = {
hash = "sha256-WecWj8rLBzG4hipOfPShhootOuBQW4sA4SSzFPMTbrw=";
hash = "sha256-U9DdP0yZIDptgFRNv3QCxWoC4P3N6bqVr4YZi730Fec=";
nativeBuildInputs = [ buildPackages.gcc ];
};
libiconv.hash = "sha256-H1BPWDmQ4s0zLnCitg+kz2yNeTU7+S7/w58SqmvHWGQ=";
libpng.hash = "sha256-N69Q7ciQuW4sFl5k5XIe7rdkQvYZ3qfo6FlvgDgDGJo=";
libiconv.hash = "sha256-HR19++jiYBnCO03EsfryUmVzukS874pE658gYivnMnI=";
libpng.hash = "sha256-BZI9UcKjP8u1/x8iroqqOyS1VEUZJLuE560W7J5PRGo=";
libssh.hash = "sha256-Z/1YdhISh2kqBjWiTOLkS+usoeeekJvAuYrVUgpxnQM=";
lwip.hash = "sha256-mB7RI9ITvS5IDawQS4pXBcDQDQhtXEk3w0Deis+SzLQ=";
lz4.hash = "sha256-IFfj+D5l+BE6JnuN0+doIAvTzXz5SHCQ+EF2m75UK08=";
lwip.hash = "sha256-Zsz+zGFRz9oacWCOGtZrCnXjJM1fT+iwW/RxR4kUX2I=";
lz4.hash = "sha256-BBo/ZoX0om5OdN148pFUL1JnD5iL2f9dq9x0zsWjyKI=";
mesa = {
hash = "sha256-szIyFAIkL14xBMdszkox00y2uwGwjHDUyQ+5bhljiJ8=";
hash = "sha256-5SHU4m3kMmi6Nfj4SBq2tO3mzsIBrRPz64dexjV4pYA=";
nativeBuildInputs = [ python ];
};
mupdf.hash = "sha256-+Q4IwYGLynoud2IEsKGfZQjpPRV6wFv5iI/ReAKBZcM=";
openssl = {
hash = "sha256-F0olTWYUwD//eJZ14ibN/IvbFXw3WQUZ/6cPI3lsxZI=";
patches = [ ./openssl.patch ];
};
mupdf.hash = "sha256-Q9uZDIguJDXPOWrQutwJvoQI8ds1MmhMH17GpGAl+Pk=";
openssl.hash = "sha256-K/flYHGOabnRplSLk13qej2prX5oILyHknNgRHlNtIY=";
qemu-usb.hash = "sha256-F4ZXeH5sx3FOcD42zFOxKFMsqGookKdav1NJ7YgVw98=";
stb.hash = "sha256-9LSH1i8jcEvjRAmTvgtK+Axy9hO7uiSzmSgBvs0zkTc=";
stdcxx.hash = "sha256-U5/+yUBXQ+rKmy6hP7OomIU4g2KvSn2qTltQFzNz9Wo=";
stdcxx.hash = "sha256-3pGfDRE+MMgM/ARmgktyIMnhJ/poe6NOfueBwehHDXQ=";
virtualbox5 = {
hash = "sha256-2QJMXsr5P+Uu/xz6M+F93JxBznVdE7ZsoZKC2o/Xycw=";
hash = "sha256-lMcZYL60t+4zOPog8idB8Hd9sFoa1f83caoN9Rw15WU=";
nativeBuildInputs = [ iasl libxslt unzip yasm ];
patches = [ ./vbox5-iasl.patch ];
};
x86emu.hash = "sha256-QY6OL+cDVjQ67JItP1rS4ufPRGZf43AZtWxwza/0q0w=";
zlib.hash = "sha256-+jl8Q3b+fw6P3aNDfLi8lohBJNaoapEld5BcE0GGTWg=";
zlib.hash = "sha256-lq1VaD9huqW7pwrAbujoPosDK43xMKS++5HQstgMfa0=";
}

Loading…
Cancel
Save