Last active
March 5, 2024 21:59
-
-
Save MatrixManAtYrService/b527300542b6fddc60cbd4fd96efd17c to your computer and use it in GitHub Desktop.
radicle in a nix devshell
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
inputs = { | |
flake-utils.url = "github:numtide/flake-utils"; | |
nixpkgs.url = "github:nixos/nixpkgs?ref=23.11"; | |
radicle.url = "git+https://seed.radicle.xyz/z3gqcJUoA1n9HaHKufZs5FCSGazv5?ref=master"; | |
}; | |
outputs = { self, nixpkgs, flake-utils, radicle }: | |
flake-utils.lib.eachDefaultSystem (system: | |
let | |
pkgs = import nixpkgs { inherit system; }; | |
frameworkSecurity = pkgs.darwin.apple_sdk.frameworks.Security; | |
# TODO: only do this if ${system} is darwin | |
# TODO: better yet, fix it in the radicle flake | |
radicle-cli = radicle.packages.${system}.radicle-cli.overrideAttrs (oldAttrs: rec { | |
NIX_LDFLAGS = "-F${frameworkSecurity}/Library/Frameworks ${oldAttrs.NIX_LDFLAGS or ""}"; | |
}); | |
in { | |
devShells.default = pkgs.mkShell { | |
buildInputs = with pkgs; [ | |
darwin.apple_sdk.frameworks.Security | |
pkg-config | |
openssl | |
radicle-cli | |
]; | |
}; | |
}); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ nix develop | |
... wait for nix to build things (only takes a long time the first time) ... | |
$ rad --version | |
rad 0.8.0 (unknown) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment