diff --git a/pkgs/development/compilers/hare/default.nix b/pkgs/development/compilers/hare/default.nix index c04897fad1bb..121365320812 100644 --- a/pkgs/development/compilers/hare/default.nix +++ b/pkgs/development/compilers/hare/default.nix @@ -1,7 +1,7 @@ { config, lib, pkgs }: -lib.makeScope pkgs.newScope (self: with self; { +lib.makeScope pkgs.newScope (self: { - harec = callPackage ./harec { }; - hare = callPackage ./hare { }; + harec = pkgs.callPackage ./harec { }; + hare = pkgs.callPackage ./hare { }; }) diff --git a/pkgs/development/compilers/hare/hare/disable-failing-test-cases.patch b/pkgs/development/compilers/hare/hare/000-disable-failing-test-cases.diff similarity index 100% rename from pkgs/development/compilers/hare/hare/disable-failing-test-cases.patch rename to pkgs/development/compilers/hare/hare/000-disable-failing-test-cases.diff diff --git a/pkgs/development/compilers/hare/hare/config-template.mk b/pkgs/development/compilers/hare/hare/config-template.mk index 1d0783b118d3..b3b0f535915a 100644 --- a/pkgs/development/compilers/hare/hare/config-template.mk +++ b/pkgs/development/compilers/hare/hare/config-template.mk @@ -25,3 +25,20 @@ SCDOC = scdoc # Where to store build artifacts # set HARECACHE externally + +# Cross-compiler toolchains +# # TODO: fixup this +AARCH64_AS=aarch64-as +AARCH64_AR=aarch64-ar +AARCH64_CC=aarch64-cc +AARCH64_LD=aarch64-ld + +RISCV64_AS=riscv64-as +RISCV64_AR=riscv64-ar +RISCV64_CC=riscv64-cc +RISCV64_LD=riscv64-ld + +X86_64_AS=as +X86_64_AR=ar +X86_64_CC=cc +X86_64_LD=ld diff --git a/pkgs/development/compilers/hare/hare/default.nix b/pkgs/development/compilers/hare/hare/default.nix index 2c6b8da6e342..c1d5e7800c95 100644 --- a/pkgs/development/compilers/hare/hare/default.nix +++ b/pkgs/development/compilers/hare/hare/default.nix @@ -2,25 +2,30 @@ , stdenv , fetchFromSourcehut , binutils-unwrapped -, harec +, harePackages , makeWrapper , qbe , scdoc , substituteAll }: -stdenv.mkDerivation (finalAttrs: { +let + inherit (harePackages) harec; +in +stdenv.mkDerivation (self: { pname = "hare"; - version = "unstable-2022-07-30"; + version = "unstable-2023-02-10"; src = fetchFromSourcehut { owner = "~sircmpwn"; repo = "hare"; - rev = "296925c91d79362d6b8ac94e0336a38e9af0f1c9"; - hash = "sha256-LeIUnpTMZ6vxgAy/LPm9/IMit41RgezdVESIv+gQFHc="; + rev = "52b3f2d0c7a85e04a79666a954101e527b7f1272"; + hash = "sha256-/zP8LbZ113Ar06MZF1zP20LKMGko+4HcOXSntLVAQAU="; }; - patches = [ ./disable-failing-test-cases.patch ]; + patches = [ + ./000-disable-failing-test-cases.diff + ]; nativeBuildInputs = [ binutils-unwrapped @@ -86,12 +91,13 @@ stdenv.mkDerivation (finalAttrs: { setupHook = ./setup-hook.sh; - meta = with lib; { + meta = { homepage = "http://harelang.org/"; description = "A systems programming language designed to be simple, stable, and robust"; - license = licenses.gpl3Only; - maintainers = with maintainers; [ AndersonTorres ]; + license = lib.licenses.gpl3Only; + maintainers = [ lib.maintainers.AndersonTorres ]; inherit (harec.meta) platforms badPlatforms; + broken = stdenv.isAarch64; # still figuring how to set cross-compiling stuff }; }) diff --git a/pkgs/development/compilers/hare/harec/default.nix b/pkgs/development/compilers/hare/harec/default.nix index bdc9ef56b9d1..b29f53151ae4 100644 --- a/pkgs/development/compilers/hare/harec/default.nix +++ b/pkgs/development/compilers/hare/harec/default.nix @@ -4,15 +4,15 @@ , qbe }: -stdenv.mkDerivation (finalAttrs: { +stdenv.mkDerivation (self: { pname = "harec"; - version = "unstable-2022-07-02"; + version = "unstable-2023-02-08"; src = fetchFromSourcehut { owner = "~sircmpwn"; repo = "harec"; - rev = "56359312644f76941de1878d33a1a0b840be8056"; - hash = "sha256-8SFYRJSvX8hmsHBgaLUfhLUV7d54im22ETZds1eASc4="; + rev = "4730fa6b835f08c44bd7991cc8b264fbc27d752b"; + hash = "sha256-XOhZWdmkMAuXbj7svILJI3wI7RF9OAb/OE1uGel4/vE="; }; nativeBuildInputs = [ @@ -30,15 +30,15 @@ stdenv.mkDerivation (finalAttrs: { doCheck = true; - meta = with lib; { + meta = { homepage = "http://harelang.org/"; description = "Bootstrapping Hare compiler written in C for POSIX systems"; - license = licenses.gpl3Only; - maintainers = with maintainers; [ AndersonTorres ]; + license = lib.licenses.gpl3Only; + maintainers = [ lib.maintainers.AndersonTorres ]; # The upstream developers do not like proprietary operating systems; see # https://harelang.org/platforms/ - platforms = with platforms; + platforms = with lib.platforms; lib.intersectLists (freebsd ++ linux) (aarch64 ++ x86_64 ++ riscv64); - badPlatforms = with platforms; darwin; + badPlatforms = lib.platforms.darwin; }; })