Skip to content

Commit

Permalink
update nix release to 24.05
Browse files Browse the repository at this point in the history
  • Loading branch information
Zoran Bošnjak committed Aug 19, 2024
1 parent 421940b commit fc7cefe
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 7 deletions.
2 changes: 1 addition & 1 deletion aspecs/aspecs.cabal
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cabal-version: 3.0
name: aspecs
version: 2.0.0
version: 2.1.0
synopsis: Asterix specifications tools.
-- description:
homepage: https://zoranbosnjak.github.io/asterix-specs/
Expand Down
26 changes: 24 additions & 2 deletions aspecs/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,26 @@ let
else packages;

haskellPackages = with pkgs.haskell.lib; pkgs.haskellPackages.override {
overrides = self: super: {
overrides = self: super:
let
fixGHC = pkg:
if static == true
then
pkg.override {
enableRelocatedStaticLibs = true;
enableShared = false;
enableDwarf = false;
}
else
pkg;
in {
ghc = fixGHC super.ghc;
buildHaskellPackages = super.buildHaskellPackages.override (oldBuildHaskellPackages: {
ghc = fixGHC oldBuildHaskellPackages.ghc;
});
# haskellPackage1 = self.callPackage ./nix/myPackage1.nix { };
# haskellPackage2 = self.callPackage ./nix/myPackage2.nix { };
# ...
};};

drv1 = haskellPackages.callCabal2nix "aspecs" ./. { };
Expand All @@ -32,6 +51,10 @@ let
"--extra-lib-dirs=${pkgs.gmp6.override { withStatic = true; }}/lib"
"--extra-lib-dirs=${pkgs.zlib.static}/lib"
"--extra-lib-dirs=${pkgs.libffi.overrideAttrs (old: { dontDisableStatic = true; })}/lib"
# double-conversion temporary patch
# This is required on nix-packages 24.05 until this patch is merged
# https://github.com/NixOS/nixpkgs/pull/322738
"--extra-lib-dirs=${pkgs.double-conversion.overrideAttrs(_: { cmakeFlags = [ ]; })}/lib"
] ++ pkgs.lib.optionals (!strip) [
"--disable-executable-stripping"
];
Expand All @@ -56,4 +79,3 @@ in
if inShell == false
then drv
else if pkgs.lib.inNixShell then env else drv

8 changes: 4 additions & 4 deletions nix/sources.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"nixpkgs": {
"branch": "release-23.11",
"branch": "release-24.05",
"description": "Nix Packages collection",
"homepage": "",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "7144d6241f02d171d25fba3edeaf15e0f2592105",
"sha256": "1lm7rkcbr7gg5zp62bga8iqyhg5hsvcly95hq0p3mcv7zq8n3wc2",
"rev": "3f38e71a8e23a27569acbbfee0e83b76c86fa569",
"sha256": "0iih3dyh6ylz9jjwjxpinblgh8p6frdx670mwpm81c0n88ivw2mw",
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/7144d6241f02d171d25fba3edeaf15e0f2592105.tar.gz",
"url": "https://github.com/NixOS/nixpkgs/archive/3f38e71a8e23a27569acbbfee0e83b76c86fa569.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
}
}

0 comments on commit fc7cefe

Please sign in to comment.