Skip to content

Commit

Permalink
chore(nix): Granular rust dependency for Haskell package
Browse files Browse the repository at this point in the history
  • Loading branch information
srid committed Jul 13, 2024
1 parent 1875d47 commit bf3bc70
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 8 deletions.
4 changes: 2 additions & 2 deletions clients/haskell/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
projectRoot = ./.;
autoWire = [ "packages" "checks" "apps" ];
settings = {
cac_client.custom = _: self'.packages.superposition;
experimentation_client.custom = _: self'.packages.superposition;
cac_client.custom = _: self'.packages.cac_client;
experimentation_client.custom = _: self'.packages.experimentation_client;
};
};

Expand Down
6 changes: 6 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
self'.devShells.haskell
config.pre-commit.devShell
];
# Add your devShell tools here
packages = with pkgs; [
docker-compose
gnumake
Expand All @@ -51,6 +52,11 @@
jq
nodejs_18
nixpkgs-fmt
bacon
cargo-watch
diesel-cli
leptosfmt
wasm-pack
];
};
};
Expand Down
34 changes: 28 additions & 6 deletions rust.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,34 @@
perSystem = { config, self', pkgs, lib, system, ... }: {
rust-project = {
crates = {
"cac_client" = {
autoWire = true;
crane = {
args = {
buildInputs = lib.optionals pkgs.stdenv.isDarwin
(with pkgs.darwin.apple_sdk.frameworks; [
Security
]) ++ [
pkgs.postgresql_12
pkgs.openssl
];
};
};
};
"experimentation_client" = {
autoWire = true;
crane = {
args = {
buildInputs = lib.optionals pkgs.stdenv.isDarwin
(with pkgs.darwin.apple_sdk.frameworks; [
Security
]) ++ [
pkgs.postgresql_12
pkgs.openssl
];
};
};
};
"superposition" = {
autoWire = true;
crane = {
Expand All @@ -19,13 +47,7 @@
pkgs.postgresql_12
];
nativeBuildInputs = with pkgs; [
# Add your Rust dev tools here.
pkg-config
bacon
cargo-watch
diesel-cli
leptosfmt
wasm-pack
];
};
extraBuildArgs = {
Expand Down

0 comments on commit bf3bc70

Please sign in to comment.