forked from the-distro/ofborg
add build for ofborg-simple-build
This commit is contained in:
parent
96639e9d7e
commit
40c759e027
17
default.nix
17
default.nix
|
@ -1,20 +1,13 @@
|
||||||
{ pkgs ? import ./nix { overlays = [ (import ./nix/overlay.nix) ]; } }:
|
{ pkgs ? import ./nix { overlays = [ (import ./nix/overlay.nix) ]; } }:
|
||||||
|
|
||||||
let
|
let
|
||||||
ofborgOverrides = {
|
ofborgCrates = pkgs.callPackage ./Cargo.nix {
|
||||||
crateOverrides = pkgs.defaultCrateOverrides // {
|
cratesIO = pkgs.callPackage ./crates-io.nix {};
|
||||||
ofborg = attrs: {
|
|
||||||
buildInputs = pkgs.lib.optional pkgs.stdenv.isDarwin
|
|
||||||
pkgs.darwin.apple_sdk.frameworks.Security;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
drv = ((pkgs.callPackage ./Cargo.nix {
|
drv = ofborgCrates.ofborg {};
|
||||||
cratesIO = pkgs.callPackage ./crates-io.nix {};
|
|
||||||
}).ofborg {}).override { release = false; };
|
|
||||||
|
|
||||||
src = stripDeps (drv.override ofborgOverrides);
|
src = stripDeps (drv.override { release = false; });
|
||||||
|
|
||||||
stripDeps = pkg: pkgs.runCommand "${pkg.name}-deps-stripped" {}
|
stripDeps = pkg: pkgs.runCommand "${pkg.name}-deps-stripped" {}
|
||||||
''
|
''
|
||||||
|
@ -27,6 +20,8 @@ let
|
||||||
in
|
in
|
||||||
|
|
||||||
{
|
{
|
||||||
|
ofborg.simple-build = ofborgCrates.ofborg_simple_build {};
|
||||||
|
|
||||||
ofborg.rs = pkgs.runCommand "ofborg-rs-symlink-compat" { inherit src; } ''
|
ofborg.rs = pkgs.runCommand "ofborg-rs-symlink-compat" { inherit src; } ''
|
||||||
mkdir -p $out/bin
|
mkdir -p $out/bin
|
||||||
for f in $(find $src -type f); do
|
for f in $(find $src -type f); do
|
||||||
|
|
|
@ -1,5 +1,14 @@
|
||||||
(self: super: {
|
(self: super:
|
||||||
|
{
|
||||||
defaultCrateOverrides = super.defaultCrateOverrides // {
|
defaultCrateOverrides = super.defaultCrateOverrides // {
|
||||||
|
ofborg = attrs: {
|
||||||
|
buildInputs = with self.darwin.apple_sdk.frameworks;
|
||||||
|
super.lib.optional super.stdenv.isDarwin Security;
|
||||||
|
};
|
||||||
|
ofborg-simple-build = attrs: {
|
||||||
|
buildInputs = with self.darwin.apple_sdk.frameworks;
|
||||||
|
super.lib.optional super.stdenv.isDarwin Security;
|
||||||
|
};
|
||||||
openssl-sys = attrs: {
|
openssl-sys = attrs: {
|
||||||
buildInputs = [ self.openssl_1_0_2 ];
|
buildInputs = [ self.openssl_1_0_2 ];
|
||||||
nativeBuildInputs = [ self.pkgconfig ];
|
nativeBuildInputs = [ self.pkgconfig ];
|
||||||
|
|
Loading…
Reference in a new issue