Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/ofborg
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: f96d6ed49237
Choose a base ref
...
head repository: NixOS/ofborg
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 931f6ae00381
Choose a head ref
  • 2 commits
  • 1 file changed
  • 2 contributors

Commits on Dec 4, 2018

  1. Copy the full SHA
    f6a9475 View commit details
  2. Merge pull request #287 from LnL7/darwin-security

    add back Security on darwin and cleanup expression
    grahamc authored Dec 4, 2018
    Copy the full SHA
    931f6ae View commit details
Showing with 28 additions and 17 deletions.
  1. +28 −17 default.nix
45 changes: 28 additions & 17 deletions default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,21 @@
{ pkgs ? import ./nix {}
}:
{ pkgs ? import ./nix {} }:

let
ofborgOverrides = {
crateOverrides = pkgs.defaultCrateOverrides // {
ofborg = attrs: {
buildInputs = pkgs.lib.optional pkgs.stdenv.isDarwin
pkgs.darwin.apple_sdk.frameworks.Security;
};
};
};

drv = (pkgs.callPackage ./ofborg/Cargo.nix {
cratesIO = pkgs.callPackage ./ofborg/crates-io.nix {};
}).ofborg {};

src = stripDeps (drv.override ofborgOverrides);

stripDeps = pkg: pkgs.runCommand "${pkg.name}-deps-stripped" {}
''
cp -r ${pkg} $out
@@ -9,14 +24,10 @@ let
find $out/bin -name '*.d' -delete
chmod -R a-w $out
'';
in {
ofborg.rs = let
drv = (pkgs.callPackage ./ofborg/Cargo.nix {
cratesIO = pkgs.callPackage ./ofborg/crates-io.nix {};
}).ofborg {};
in pkgs.runCommand "ofborg-rs-symlink-compat" {
src = stripDeps drv;
} ''
in

{
ofborg.rs = pkgs.runCommand "ofborg-rs-symlink-compat" { inherit src; } ''
mkdir -p $out/bin
for f in $(find $src -type f); do
bn=$(basename "$f")
@@ -44,21 +55,21 @@ in {
Build failed because you bumped the Cargo
version without regenerating the carnix
file.
Build failed because you bumped the Cargo
version without regenerating the carnix
file.
Run:
Run:
nix-shell --run ./nix/update-carnix.sh
nix-shell --run ./nix/update-carnix.sh
and commit those changes.
and commit those changes.
EOF
EOF
fi
'';