mirror of
https://github.com/rosenpass/rosenpass.git
synced 2025-12-05 20:40:02 -08:00
This splits the complexity of the `flake.nix` into multiple files. At cross-compiled and static builds at the benefit of simpler nix expressions and generally better cross compilation compatibility. the same time, naersk is removed; causing much slower builds for cross- compiled packages. This partially addresses the points mentioned in #412.
28 lines
813 B
Nix
28 lines
813 B
Nix
{ lib, stdenvNoCC, runCommandNoCC, pkgsStatic, rosenpass, rosenpass-oci-image, rp } @ args:
|
|
|
|
let
|
|
version = rosenpass.version;
|
|
|
|
# select static packages on Linux, default packages otherwise
|
|
package =
|
|
if stdenvNoCC.hostPlatform.isLinux then
|
|
pkgsStatic.rosenpass
|
|
else args.rosenpass;
|
|
rp =
|
|
if stdenvNoCC.hostPlatform.isLinux then
|
|
pkgsStatic.rp
|
|
else args.rp;
|
|
oci-image =
|
|
if stdenvNoCC.hostPlatform.isLinux then
|
|
pkgsStatic.rosenpass-oci-image
|
|
else args.rosenpass-oci-image;
|
|
in
|
|
runCommandNoCC "lace-result" { } ''
|
|
mkdir {bin,$out}
|
|
tar -cvf $out/rosenpass-${stdenvNoCC.hostPlatform.system}-${version}.tar \
|
|
-C ${package} bin/rosenpass \
|
|
-C ${rp} bin/rp
|
|
cp ${oci-image} \
|
|
$out/rosenpass-oci-image-${stdenvNoCC.hostPlatform.system}-${version}.tar.gz
|
|
''
|