2019-04-04 11:33:38 +03:00
|
|
|
# Pinned version of nixpkgs that we use for our development and deployment.
|
|
|
|
|
2022-02-14 21:06:17 +03:00
|
|
|
{ system ? import ./system.nix
|
|
|
|
, ...
|
|
|
|
}:
|
2019-04-04 11:33:38 +03:00
|
|
|
|
|
|
|
let
|
|
|
|
# See ./nixpkgs/README.md for upgrade instructions.
|
2019-06-27 19:47:42 +03:00
|
|
|
src = import ./nixpkgs;
|
2019-04-04 11:33:38 +03:00
|
|
|
|
|
|
|
# package overrides
|
|
|
|
overrides = _: pkgs: rec {
|
2022-01-17 14:05:53 +03:00
|
|
|
nodejs = pkgs.nodejs-14_x;
|
2019-06-27 19:47:42 +03:00
|
|
|
ephemeralpg = pkgs.ephemeralpg.overrideAttrs(oldAttrs: {
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out
|
|
|
|
PREFIX=$out make install
|
2021-11-18 12:03:01 +03:00
|
|
|
wrapProgram $out/bin/pg_tmp --prefix PATH : ${pkgs.postgresql_10}/bin:$out/bin
|
2019-06-27 19:47:42 +03:00
|
|
|
'';
|
|
|
|
});
|
2021-02-16 12:39:16 +03:00
|
|
|
scala_2_13 = pkgs.scala_2_13.overrideAttrs (oldAttrs: rec {
|
2022-02-03 12:05:31 +03:00
|
|
|
version = "2.13.8";
|
|
|
|
name = "scala-2.13.8";
|
2021-02-16 12:39:16 +03:00
|
|
|
src = pkgs.fetchurl {
|
|
|
|
url = "https://www.scala-lang.org/files/archive/${name}.tgz";
|
2022-02-03 12:05:31 +03:00
|
|
|
sha256 = "1kql2gh9s6xy0r4zalk7f8qx0l35n0d7m0ww1sgq6lf6d621vcrc";
|
2021-02-16 12:39:16 +03:00
|
|
|
};
|
|
|
|
});
|
2021-02-11 12:08:47 +03:00
|
|
|
|
Revert "Switch to Bazel 5 (#12935)" (#12974)
This reverts commit 4c0118df4d0304153e8f6ed9e3cfb1a1295876df.
This breaks passing -p to bazel test for Haskell tests, e.g.,
bazel test //compiler/damlc/tests:integration-v1dev --test_arg -p
--test_arg InterfaceEq
which breaks with something horrifying like
moritz@adjunction ~/daml (main)> bazel test //compiler/damlc/tests:integration-v1dev --test_arg -p --test_arg InterfaceEq
[dev-env] Building tools.bazel...
[dev-env] Built tools.bazel in /nix/store/m7gzlmr0pqjpl01ihgvazxgfs3sfwl61-bazel and linked to /home/moritz/daml/dev-env/var/gc-roots/bazel
[dev-env] Building tools.find...
[dev-env] Built tools.find in /nix/store/645v3545lcbx77wq7355rgdrgbhn5wx7-findutils-4.8.0 and linked to /home/moritz/daml/dev-env/var/gc-roots/find
INFO: Invocation ID: 034b3e45-851f-472e-ab71-b7f718829582
DEBUG: /home/moritz/.cache/bazel/_bazel_moritz/bb4e4404f889dc1b816f246b08c0d9ea/external/rules_haskell/haskell/private/versions.bzl:60:10: WARNING: bazel version is too recent. Supported versions range from 4.0.0 to 4.2.1, but found: 5.0.0- (@non-git)
/nix/store/dadkhf8vch2i2kvig962ilfr5j3chshr-go-1.17.6
/nix/store/pzh24n543i6jqa01hdmgqknlyf294bn1-bazel-nixpkgs-posix-toolchain
/nix/store/2hfwndk47wpvaib06qyhcdp83b423xvh-jq-1.6-bin
/nix/store/hjggs9s82qh7r5j8sgapn389hf24wdx8-bazel-nixpkgs-cc-toolchain
/nix/store/yxgg3bn4v288sc00kf09svrwz2r461c9-ghc-native-bignum-9.0.2
/nix/store/2hwx0jhcdsx3wfvmb50ih19jkh2ra4jh-glibc-locales-2.33-108
/nix/store/8wpmx049z8m0ffhy3jyi41qb6pbxwvy8-bazel-nixpkgs-java-runtime
ERROR: file 'external/bazel_tools/src/tools/launcher/_objs/launcher/dummy.pic.o' is generated by these conflicting actions:
Label: @bazel_tools//src/tools/launcher:launcher
RuleClass: cc_binary rule
Configuration: 869f6bbd14d2ac66dcacb164312d88fa059b017e3c17513cb5051b23879ac7f9, 8c138cc79f95329f01b0d325511ad0ea89ca5126e421e67e5239706d0f247c2c
Mnemonic: CppCompile
Action key: 3d79fe1470dcb842d5944c98dfe7a62715db6d86fdb12d3ff60af3bdf41b7996
Progress message: Compiling src/tools/launcher/dummy.cc
PrimaryInput: File:[/home/moritz/.cache/bazel/_bazel_moritz/bb4e4404f889dc1b816f246b08c0d9ea/external/bazel_tools[source]]src/tools/launcher/dummy.cc
PrimaryOutput: File:[[<execution_root>]bazel-out/k8-opt/bin]external/bazel_tools/src/tools/launcher/_objs/launcher/dummy.pic.o
Owner information: ConfiguredTargetKey{label=@bazel_tools//src/tools/launcher:launcher, config=BuildConfigurationValue.Key[869f6bbd14d2ac66dcacb164312d88fa059b017e3c17513cb5051b23879ac7f9]}, ConfiguredTargetKey{label=@bazel_tools//src/tools/launcher:launcher, config=BuildConfigurationValue.Key[8c138cc79f95329f01b0d325511ad0ea89ca5126e421e67e5239706d0f247c2c]}
MandatoryInputs: are equal
Outputs: are equal
ERROR: file 'external/bazel_tools/src/tools/launcher/_objs/launcher/dummy.o' is generated by these conflicting actions:
Label: @bazel_tools//src/tools/launcher:launcher
RuleClass: cc_binary rule
Configuration: 869f6bbd14d2ac66dcacb164312d88fa059b017e3c17513cb5051b23879ac7f9, 8c138cc79f95329f01b0d325511ad0ea89ca5126e421e67e5239706d0f247c2c
Mnemonic: CppCompile
Action key: 9f46e824944add9e9951ef51ddb6cb4b744bc97f90b5749132179d1d1699dfa1
Progress message: Compiling src/tools/launcher/dummy.cc
PrimaryInput: File:[/home/moritz/.cache/bazel/_bazel_moritz/bb4e4404f889dc1b816f246b08c0d9ea/external/bazel_tools[source]]src/tools/launcher/dummy.cc
PrimaryOutput: File:[[<execution_root>]bazel-out/k8-opt/bin]external/bazel_tools/src/tools/launcher/_objs/launcher/dummy.o
Owner information: ConfiguredTargetKey{label=@bazel_tools//src/tools/launcher:launcher, config=BuildConfigurationValue.Key[869f6bbd14d2ac66dcacb164312d88fa059b017e3c17513cb5051b23879ac7f9]}, ConfiguredTargetKey{label=@bazel_tools//src/tools/launcher:launcher, config=BuildConfigurationValue.Key[8c138cc79f95329f01b0d325511ad0ea89ca5126e421e67e5239706d0f247c2c]}
MandatoryInputs: are equal
Outputs: are equal
ERROR: com.google.devtools.build.lib.skyframe.ArtifactConflictFinder$ConflictException: com.google.devtools.build.lib.actions.MutableActionGraph$ActionConflictException: for external/bazel_tools/src/tools/launcher/_objs/launcher/dummy.o, previous action: action 'Compiling src/tools/launcher/dummy.cc', attempted action: action 'Compiling src/tools/launcher/dummy.cc'
changelog_begin
changelog_end
2022-02-16 21:24:00 +03:00
|
|
|
bazel_4 = pkgs.bazel_4.overrideAttrs(oldAttrs: {
|
2021-02-11 12:08:47 +03:00
|
|
|
patches = oldAttrs.patches ++ [
|
|
|
|
# This should be upstreamed. Bazel is too aggressive
|
|
|
|
# in treating arguments starting with @ as response files.
|
|
|
|
./bazel-cc-wrapper-response-file.patch
|
2021-07-01 15:40:29 +03:00
|
|
|
# This should be upstreamed once we tested it a bit
|
|
|
|
# on our own setup.
|
|
|
|
./bazel-retry-cache.patch
|
2021-02-11 12:08:47 +03:00
|
|
|
];
|
|
|
|
});
|
2019-04-04 11:33:38 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
nixpkgs = import src {
|
|
|
|
inherit system;
|
|
|
|
|
|
|
|
# pin the overlays
|
|
|
|
overlays = [overrides];
|
|
|
|
|
|
|
|
config.allowUnfree = true;
|
|
|
|
config.allowBroken = true;
|
|
|
|
};
|
|
|
|
in
|
|
|
|
nixpkgs
|