| 7 Jul 2021 |
cole-h | That's what I'm here for :P | 19:20:57 |
andi- | Very good. I'll propose more breaking changes! | 19:21:19 |
cole-h | Haha | 19:21:46 |
cole-h | andi-: Do you happen to have a mac on hand? | 21:20:49 |
andi- | What for? Building ofBorg? | 21:21:14 |
cole-h | Yeah. With your PR merged, ofborg can't find Security to link against anymore | 21:21:27 |
cole-h | I'm thinking it's because defaultCrateOverrides is no longer respected, or something along those lines | 21:21:39 |
andi- | oh, add it to buildInputs | 21:22:03 |
cole-h | (since we have an overlay does adds Security to the things, but that didn't appear to work) | 21:22:06 |
andi- | I still wonder why we don't just have all the mac shit in all the stdenv builds on darwin... | 21:22:27 |
cole-h | Good question tbh. | 21:22:51 |
andi- | I am testing on this m1 now. Don't have another mac right now. | 21:23:29 |
cole-h | Appreciate it, thanks. | 21:23:49 |
andi- | gonna take a while. Eval is super slow on this machine for whatever reason. Might just be the newer Nix :/ | 21:24:47 |
cole-h | All good. I've rolled back the darwin machine to the previous generation for the moment. | 21:25:06 |
andi- | cole-h:
Compiling bitvec v0.19.5
diff --git a/default.nix b/default.nix
index 644ebb0..8d1ff6f 100644
--- a/default.nix
+++ b/default.nix
@@ -4,6 +4,8 @@
}:
let
+ inherit (pkgs) lib;
+
pkg = pkgs.rustPlatform.buildRustPackage {
name = "ofborg";
src = pkgs.nix-gitignore.gitignoreSource [] ./.;
@@ -15,7 +17,10 @@ let
buildInputs = with pkgs; [
openssl
- ];
+ ] ++ lib.optional pkgs.stdenv.isDarwin (with pkgs; [
+ darwin.apple_sdk.frameworks.Security
+ darwin.apple_sdk.frameworks.CoreFoundation
+ ]);
preBuild = ''
cargo clippy
| 21:33:47 |
andi- | * cole-h:
diff --git a/default.nix b/default.nix
index 644ebb0..8d1ff6f 100644
--- a/default.nix
+++ b/default.nix
@@ -4,6 +4,8 @@
}:
let
+ inherit (pkgs) lib;
+
pkg = pkgs.rustPlatform.buildRustPackage {
name = "ofborg";
src = pkgs.nix-gitignore.gitignoreSource [] ./.;
@@ -15,7 +17,10 @@ let
buildInputs = with pkgs; [
openssl
- ];
+ ] ++ lib.optional pkgs.stdenv.isDarwin (with pkgs; [
+ darwin.apple_sdk.frameworks.Security
+ darwin.apple_sdk.frameworks.CoreFoundation
+ ]);
preBuild = ''
cargo clippy
| 21:33:54 |
Sandro 🐧 | Why not use with pkgs once at the beginning? | 21:34:44 |
cole-h | Thanks Andi | 21:35:06 |
cole-h | withs with large scopes are not fun to debug :) | 21:35:23 |
andi- | to keep the namespace sane and not pollute whatever someone might merge with little review into the scope. It makes it easier to reason about. | 21:35:24 |
piegames | I'm really not fond of with statements because they are glob imports, but they have a valid use case in lists of packages. | 21:36:18 |
| * piegames would really like to have an import statement that allows to write lib.foo without having to do with pkgs; | 21:36:50 |
Sandro 🐧 | Having with pkgs on every other line is just noise and makes the file not easily copyable into nixpkgs. | 21:37:26 |
andi- | inherit (pkgs) lib? | 21:37:24 |
piegames | Obvious hacky workaround: with { lib = pkgs.lib; }; | 21:37:32 |
piegames | In reply to @andi:kack.it
inherit (pkgs) lib? Oh I see. I didn't know this was applicable in let bindings as well, I thought I had to write let lib = pkgs.lib(to be fair, they are more or less equally bad) | 21:38:51 |
cole-h | %s/with pkgs; ?// is pretty easy if you want to copy into Nixpkgs ;) | 21:39:16 |
cole-h | But I prefer sparse withs to global withs. | 21:39:34 |
Sandro 🐧 | That won't work. You still have some () around | 21:40:02 |