Skip to content

Commit

Permalink
build(nix): update dependencies
Browse files Browse the repository at this point in the history
Signed-off-by: Roman Volosatovs <[email protected]>
  • Loading branch information
rvolosatovs committed Dec 6, 2024
1 parent 40cd6f2 commit a6538fe
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 85 deletions.
85 changes: 41 additions & 44 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

58 changes: 17 additions & 41 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@
targets.s390x-unknown-linux-gnu = false;
targets.wasm32-unknown-unknown = false;
targets.wasm32-wasip1 = false;
targets.wasm32-wasip2 = false;

clippy.deny = ["warnings"];
clippy.workspace = true;
Expand All @@ -97,51 +98,26 @@
pkgsCross ? pkgs,
...
}: {
buildInputs ? [],
depsBuildBuild ? [],
nativeBuildInputs ? [],
nativeCheckInputs ? [],
preCheck ? "",
...
} @ args:
with pkgs.lib; let
darwin2darwin = pkgs.stdenv.hostPlatform.isDarwin && pkgsCross.stdenv.hostPlatform.isDarwin;

depsBuildBuild' =
depsBuildBuild
++ optional pkgs.stdenv.hostPlatform.isDarwin pkgs.darwin.apple_sdk.frameworks.SystemConfiguration
++ optional darwin2darwin pkgs.xcbuild.xcrun;
in
{
buildInputs =
buildInputs
++ optional pkgs.stdenv.hostPlatform.isDarwin pkgs.libiconv;

depsBuildBuild = depsBuildBuild';
}
// optionalAttrs (args ? cargoArtifacts) {
preCheck =
''
export GOCACHE=$TMPDIR/gocache
export GOMODCACHE=$TMPDIR/gomod
export GOPATH=$TMPDIR/go
export HOME=$TMPDIR/home
''
+ preCheck;

depsBuildBuild =
depsBuildBuild'
++ optionals darwin2darwin [
pkgs.darwin.apple_sdk.frameworks.CoreFoundation
pkgs.darwin.apple_sdk.frameworks.CoreServices
];

nativeCheckInputs =
nativeCheckInputs
++ [
pkgs.pkgsUnstable.go
];
};
optionalAttrs (args ? cargoArtifacts) {
preCheck =
''
export GOCACHE=$TMPDIR/gocache
export GOMODCACHE=$TMPDIR/gomod
export GOPATH=$TMPDIR/go
export HOME=$TMPDIR/home
''
+ preCheck;

nativeCheckInputs =
nativeCheckInputs
++ [
pkgs.pkgsUnstable.go
];
};

withPackages = {
hostRustToolchain,
Expand Down

0 comments on commit a6538fe

Please sign in to comment.