nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix

Merge pull request #271476 from onemoresuza/hare

hare: unstable-2023-10-23 -> unstable-2023-11-27; harec: unstable-2023-10-22 -> unstable-2023-11-29

authored by

Peder Bergebakken Sundt and committed by
GitHub
239c6fbc adf2347f

+122 -107
+28
pkgs/by-name/ha/hare/001-tzdata.patch
··· 1 + diff --git a/time/chrono/+freebsd.ha b/time/chrono/+freebsd.ha 2 + index 26d78ab1..6861bfe8 100644 3 + --- a/time/chrono/+freebsd.ha 4 + +++ b/time/chrono/+freebsd.ha 5 + @@ -2,7 +2,7 @@ 6 + // (c) Hare authors <https://harelang.org> 7 + 8 + def LOCALTIME_PATH: str = "/etc/localtime"; 9 + -def ZONEINFO_PREFIX: str = "/usr/share/zoneinfo/"; 10 + +def ZONEINFO_PREFIX: str = "@tzdata@/share/zoneinfo/"; 11 + 12 + // The filepath of the system's "leap-seconds.list" file, which contains UTC/TAI 13 + // leap second data. 14 + diff --git a/time/chrono/+linux.ha b/time/chrono/+linux.ha 15 + index 600f606c..8d5617e2 100644 16 + --- a/time/chrono/+linux.ha 17 + +++ b/time/chrono/+linux.ha 18 + @@ -2,8 +2,8 @@ 19 + // (c) Hare authors <https://harelang.org> 20 + 21 + def LOCALTIME_PATH: str = "/etc/localtime"; 22 + -def ZONEINFO_PREFIX: str = "/usr/share/zoneinfo/"; 23 + +def ZONEINFO_PREFIX: str = "@tzdata@/share/zoneinfo/"; 24 + 25 + // The filepath of the system's "leap-seconds.list" file, which contains UTC/TAI 26 + // leap second data. 27 + -export def UTC_LEAPSECS_FILE: str = "/usr/share/zoneinfo/leap-seconds.list"; 28 + +export def UTC_LEAPSECS_FILE: str = "@tzdata@/share/zoneinfo/leap-seconds.list";
+91
pkgs/by-name/ha/hare/package.nix
··· 1 + { lib 2 + , stdenv 3 + , fetchFromSourcehut 4 + , binutils-unwrapped 5 + , harec 6 + , makeWrapper 7 + , qbe 8 + , scdoc 9 + , tzdata 10 + , substituteAll 11 + }: 12 + 13 + let 14 + # We use harec's override of qbe until 1.2 is released, but the `qbe` argument 15 + # is kept to avoid breakage. 16 + qbe = harec.qbeUnstable; 17 + # https://harelang.org/platforms/ 18 + arch = stdenv.hostPlatform.uname.processor; 19 + platform = lib.strings.toLower stdenv.hostPlatform.uname.system; 20 + in 21 + stdenv.mkDerivation (finalAttrs: { 22 + pname = "hare"; 23 + version = "unstable-2023-11-27"; 24 + 25 + outputs = [ "out" "man" ]; 26 + 27 + src = fetchFromSourcehut { 28 + owner = "~sircmpwn"; 29 + repo = "hare"; 30 + rev = "d94f355481a320fb2aec13ef62cb3bfe2416f5e4"; 31 + hash = "sha256-Mpl3VO4xvLCKHeYr/FPuS6jl8CkyeqDz18mQ6Zv05oc="; 32 + }; 33 + 34 + patches = [ 35 + # Replace FHS paths with nix store 36 + (substituteAll { 37 + src = ./001-tzdata.patch; 38 + inherit tzdata; 39 + }) 40 + ]; 41 + 42 + nativeBuildInputs = [ 43 + harec 44 + makeWrapper 45 + qbe 46 + scdoc 47 + ]; 48 + 49 + buildInputs = [ 50 + binutils-unwrapped 51 + harec 52 + qbe 53 + tzdata 54 + ]; 55 + 56 + makeFlags = [ 57 + "HARECACHE=.harecache" 58 + "PREFIX=${builtins.placeholder "out"}" 59 + "PLATFORM=${platform}" 60 + "ARCH=${arch}" 61 + ]; 62 + 63 + enableParallelBuilding = true; 64 + 65 + # Append the distribution name to the version 66 + env.LOCALVER = "nixpkgs"; 67 + 68 + strictDeps = true; 69 + 70 + doCheck = true; 71 + 72 + preConfigure = '' 73 + ln -s config.example.mk config.mk 74 + ''; 75 + 76 + postFixup = '' 77 + wrapProgram $out/bin/hare \ 78 + --prefix PATH : ${lib.makeBinPath [binutils-unwrapped harec qbe]} 79 + ''; 80 + 81 + setupHook = ./setup-hook.sh; 82 + 83 + meta = { 84 + homepage = "https://harelang.org/"; 85 + description = "Systems programming language designed to be simple, stable, and robust"; 86 + license = lib.licenses.gpl3Only; 87 + maintainers = with lib.maintainers; [ onemoresuza ]; 88 + mainProgram = "hare"; 89 + inherit (harec.meta) platforms badPlatforms; 90 + }; 91 + })
-100
pkgs/development/compilers/hare/default.nix
··· 1 - { lib 2 - , stdenv 3 - , fetchFromSourcehut 4 - , binutils-unwrapped 5 - , harec 6 - , makeWrapper 7 - , qbe 8 - , scdoc 9 - }: 10 - 11 - let 12 - # We use harec's override of qbe until 1.2 is released, but the `qbe` argument 13 - # is kept to avoid breakage. 14 - qbe = harec.qbeUnstable; 15 - in 16 - stdenv.mkDerivation (finalAttrs: { 17 - pname = "hare"; 18 - version = "unstable-2023-10-23"; 19 - 20 - src = fetchFromSourcehut { 21 - owner = "~sircmpwn"; 22 - repo = "hare"; 23 - rev = "1048620a7a25134db370bf24736efff1ffcb2483"; 24 - hash = "sha256-slQPIhrcM+KAVAvjuRnqNdEAEr4Xa4iQNVEpI7Wl+Ks="; 25 - }; 26 - 27 - nativeBuildInputs = [ 28 - binutils-unwrapped 29 - harec 30 - makeWrapper 31 - qbe 32 - scdoc 33 - ]; 34 - 35 - buildInputs = [ 36 - binutils-unwrapped 37 - harec 38 - qbe 39 - ]; 40 - 41 - # Append the distribution name to the version 42 - env.LOCALVER = "nix"; 43 - 44 - configurePhase = 45 - let 46 - # https://harelang.org/platforms/ 47 - arch = 48 - if stdenv.isx86_64 then "x86_64" 49 - else if stdenv.isAarch64 then "aarch64" 50 - else if stdenv.hostPlatform.isRiscV && stdenv.is64bit then "riscv64" 51 - else "unsupported"; 52 - platform = 53 - if stdenv.isLinux then "linux" 54 - else if stdenv.isFreeBSD then "freebsd" 55 - else "unsupported"; 56 - in 57 - '' 58 - runHook preConfigure 59 - 60 - cp config.example.mk config.mk 61 - makeFlagsArray+=( 62 - PREFIX="${builtins.placeholder "out"}" 63 - HARECACHE="$(mktemp -d --tmpdir harecache.XXXXXXXX)" 64 - BINOUT="$(mktemp -d --tmpdir bin.XXXXXXXX)" 65 - PLATFORM="${platform}" 66 - ARCH="${arch}" 67 - ) 68 - 69 - runHook postConfigure 70 - ''; 71 - 72 - doCheck = true; 73 - 74 - postFixup = 75 - let 76 - binPath = lib.makeBinPath [ 77 - binutils-unwrapped 78 - harec 79 - qbe 80 - ]; 81 - in 82 - '' 83 - wrapProgram $out/bin/hare --prefix PATH : ${binPath} 84 - ''; 85 - 86 - setupHook = ./setup-hook.sh; 87 - 88 - strictDeps = true; 89 - enableParallelBuilding = true; 90 - 91 - meta = { 92 - homepage = "https://harelang.org/"; 93 - description = 94 - "A systems programming language designed to be simple, stable, and robust"; 95 - license = lib.licenses.gpl3Only; 96 - maintainers = with lib.maintainers; [ onemoresuza ]; 97 - mainProgram = "hare"; 98 - inherit (harec.meta) platforms badPlatforms; 99 - }; 100 - })
pkgs/development/compilers/hare/setup-hook.sh pkgs/by-name/ha/hare/setup-hook.sh
+3 -3
pkgs/development/compilers/harec/default.nix pkgs/by-name/ha/harec/package.nix
··· 19 19 in 20 20 stdenv.mkDerivation (finalAttrs: { 21 21 pname = "harec"; 22 - version = "unstable-2023-10-22"; 22 + version = "unstable-2023-11-29"; 23 23 24 24 src = fetchFromSourcehut { 25 25 owner = "~sircmpwn"; 26 26 repo = "harec"; 27 - rev = "64dea196ce040fbf3417e1b4fb11331688672aca"; 28 - hash = "sha256-2Aeb+OZ/hYUyyxx6aTw+Oxiac+p+SClxtg0h68ZBSHc="; 27 + rev = "ec3193e3870436180b0f3df82b769adc57a1c099"; 28 + hash = "sha256-HXQIgFC4YVDJjo5xbyg1ea3jWYKLEwKkD1KFzWFz9UI= "; 29 29 }; 30 30 31 31 nativeBuildInputs = [
-4
pkgs/top-level/all-packages.nix
··· 9137 9137 llvmPackages = llvmPackages_16; 9138 9138 }; 9139 9139 9140 - hare = callPackage ../development/compilers/hare { }; 9141 - 9142 - harec = callPackage ../development/compilers/harec { }; 9143 - 9144 9140 hareThirdParty = recurseIntoAttrs (callPackage ./hare-third-party.nix { }); 9145 9141 9146 9142 ham = pkgs.perlPackages.ham;