Skip to content

Commit

Permalink
chore: bump nixpkgs to release-24.05 (#4699)
Browse files Browse the repository at this point in the history
  • Loading branch information
ggreif authored Sep 17, 2024
1 parent 9a3ea6e commit fb4f7cc
Show file tree
Hide file tree
Showing 7 changed files with 41 additions and 25 deletions.
16 changes: 11 additions & 5 deletions default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

let nixpkgs = import ./nix { inherit system; }; in

assert !officialRelease || nixpkgs.lib.asserts.assertOneOf "system" system [ "x86_64-linux" "x86_64-darwin" ];

let releaseVersion = import nix/releaseVersion.nix { pkgs = nixpkgs; inherit officialRelease; }; in

let stdenv = nixpkgs.stdenv; in
Expand All @@ -20,13 +22,17 @@ let ic-ref-run =
cp ${ic-hs-pkgs.ic-hs}/bin/ic-ref-run $out/bin
''; in

let
nixos-unstable = import nixpkgs.sources.nixpkgs-unstable {};
in

let haskellPackages = nixpkgs.haskellPackages.override {
overrides = import nix/haskell-packages.nix nixpkgs subpath;
}; in

let emscripten = nixpkgs.emscripten.overrideAttrs (oldAttrs: {
patches = (oldAttrs.patches or []) ++ [
nix/emscripten-fix.patch
];
});
in

let
rtsBuildInputs = with nixpkgs; [
# pulls in clang (wrapped) and clang-13 (unwrapped)
Expand All @@ -39,7 +45,7 @@ let
wasmtime
rust-bindgen
python3
nixos-unstable.emscripten
emscripten
] ++ pkgs.lib.optional pkgs.stdenv.isDarwin [
libiconv
];
Expand Down
22 changes: 22 additions & 0 deletions nix/emscripten-fix.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
diff --git a/tools/config.py b/tools/config.py
index aaff153a0..ce70df7e4 100644
--- a/tools/config.py
+++ b/tools/config.py
@@ -90,7 +90,7 @@ def normalize_config_settings():
# be removed in the future since such installations should probably be
# setting a specific cache location.
logger.debug('Using home-directory for emscripten cache due to read-only root')
- CACHE = os.path.expanduser(os.path.join('~', '.emscripten_cache'))
+ CACHE = os.path.expanduser(os.path.join(os.getcwd(), '.emscripten_cache'))
if not PORTS:
PORTS = os.path.join(CACHE, 'ports')

@@ -255,7 +255,7 @@ def find_config_file():
# See: https://github.com/emscripten-core/emsdk/pull/367
emsdk_root = os.path.dirname(os.path.dirname(path_from_root()))
emsdk_embedded_config = os.path.join(emsdk_root, '.emscripten')
- user_home_config = os.path.expanduser('~/.emscripten')
+ user_home_config = os.path.join(os.getcwd(), '.emscripten-home')

if '--em-config' in sys.argv:
i = sys.argv.index('--em-config')
20 changes: 4 additions & 16 deletions nix/sources.json
Original file line number Diff line number Diff line change
Expand Up @@ -108,16 +108,16 @@
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"nixpkgs": {
"branch": "release-23.11",
"branch": "release-24.05",
"builtin": true,
"description": "Nixpkgs/NixOS branches that track the Nixpkgs/NixOS channels",
"homepage": null,
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "6a5b92486ae7826c07fbfad302f569ceb187b0eb",
"sha256": "058kf03v7yh1c4ns96af6jq3ymadv71s7ajv9s05ipl9bnkjfrhm",
"rev": "68f19df4809ea68e782cddc5f3e9827cb5db65cb",
"sha256": "1caizbyi4sc5b47il8kbr2a8aripyb6wqw56dpgdhcmfhng17wb0",
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/6a5b92486ae7826c07fbfad302f569ceb187b0eb.tar.gz",
"url": "https://github.com/NixOS/nixpkgs/archive/68f19df4809ea68e782cddc5f3e9827cb5db65cb.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"nixpkgs-mozilla": {
Expand All @@ -133,18 +133,6 @@
"url": "https://github.com/mozilla/nixpkgs-mozilla/archive/1ca9ee7192f973fd67b0988bdd77b8c11ae245a6.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"nixpkgs-unstable": {
"branch": "master",
"description": "Nix Packages collection & NixOS",
"homepage": "",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "9d2864289e65d0dc841123ae86bc7b3f77b6d12d",
"sha256": "0f3bcphzrjm1hs81mhpfx1hqxfnbvhhv5hv82wi1h3f735i279ja",
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/9d2864289e65d0dc841123ae86bc7b3f77b6d12d.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"ocaml-vlq": {
"branch": "v0.2.0",
"builtin": false,
Expand Down
2 changes: 1 addition & 1 deletion src/docs/.ocamlformat
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version=0.26.1
version=0.26.2
ocaml-version=4.12
break-infix=fit-or-vertical
doc-comments=before
2 changes: 1 addition & 1 deletion src/languageServer/.ocamlformat
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version=0.26.1
version=0.26.2
ocaml-version=4.12
break-infix=fit-or-vertical
doc-comments=before
2 changes: 1 addition & 1 deletion test/lsp-int/lsp-int.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ executable lsp-int
main-is: Main.hs
-- other-modules:
other-extensions: OverloadedStrings, DuplicateRecordFields
build-depends: base ^>=4.17
build-depends: base ^>=4.18
, text ^>=2.0
, hspec
, HUnit
Expand Down
2 changes: 1 addition & 1 deletion test/random/qc-motoko.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ executable qc-motoko
other-modules: Embedder, Turtle.Pipe
other-extensions: ConstraintKinds, StandaloneDeriving, DataKinds, KindSignatures, GADTs, MultiParamTypeClasses
ghc-options: -O -threaded -with-rtsopts=-N2
build-depends: base ^>=4.17
build-depends: base ^>=4.18
, text ^>=2.0
, process
, exceptions
Expand Down

0 comments on commit fb4f7cc

Please sign in to comment.