add build for ofborg-simple-build

This commit is contained in:
Daiderd Jordan 2020-04-25 14:32:42 +02:00
parent 96639e9d7e
commit 40c759e027
No known key found for this signature in database
GPG key ID: D02435D05B810C96
2 changed files with 16 additions and 12 deletions

View file

@ -1,20 +1,13 @@
{ pkgs ? import ./nix { overlays = [ (import ./nix/overlay.nix) ]; } }:
let
ofborgOverrides = {
crateOverrides = pkgs.defaultCrateOverrides // {
ofborg = attrs: {
buildInputs = pkgs.lib.optional pkgs.stdenv.isDarwin
pkgs.darwin.apple_sdk.frameworks.Security;
};
};
ofborgCrates = pkgs.callPackage ./Cargo.nix {
cratesIO = pkgs.callPackage ./crates-io.nix {};
};
drv = ((pkgs.callPackage ./Cargo.nix {
cratesIO = pkgs.callPackage ./crates-io.nix {};
}).ofborg {}).override { release = false; };
drv = ofborgCrates.ofborg {};
src = stripDeps (drv.override ofborgOverrides);
src = stripDeps (drv.override { release = false; });
stripDeps = pkg: pkgs.runCommand "${pkg.name}-deps-stripped" {}
''
@ -27,6 +20,8 @@ let
in
{
ofborg.simple-build = ofborgCrates.ofborg_simple_build {};
ofborg.rs = pkgs.runCommand "ofborg-rs-symlink-compat" { inherit src; } ''
mkdir -p $out/bin
for f in $(find $src -type f); do

View file

@ -1,5 +1,14 @@
(self: super: {
(self: super:
{
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: {
buildInputs = [ self.openssl_1_0_2 ];
nativeBuildInputs = [ self.pkgconfig ];