Merge pull request #285932 from onemoresuza/hare
hare: unstable-2023-11-27 -> 0-unstable-2024-02-01
This commit is contained in:
commit
d5245c0ef7
4 changed files with 37 additions and 38 deletions
|
@ -8,6 +8,7 @@
|
|||
, scdoc
|
||||
, tzdata
|
||||
, substituteAll
|
||||
, unstableGitUpdater
|
||||
, callPackage
|
||||
, enableCrossCompilation ? (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.is64bit)
|
||||
, pkgsCross
|
||||
|
@ -16,7 +17,7 @@
|
|||
, riscv64PkgsCrossToolchain ? pkgsCross.riscv64
|
||||
}:
|
||||
|
||||
# There's no support for `aarch64-freebsd` or `riscv64-freebsd` on nix.
|
||||
# There's no support for `aarch64` or `riscv64` for freebsd nor for openbsd on nix.
|
||||
# See `lib.systems.doubles.aarch64` and `lib.systems.doubles.riscv64`.
|
||||
assert let
|
||||
inherit (stdenv.hostPlatform) isLinux is64bit;
|
||||
|
@ -33,7 +34,6 @@ let
|
|||
# We use harec's override of qbe until 1.2 is released, but the `qbe` argument
|
||||
# is kept to avoid breakage.
|
||||
qbe = harec.qbeUnstable;
|
||||
# https://harelang.org/platforms/
|
||||
arch = stdenv.hostPlatform.uname.processor;
|
||||
platform = lib.toLower stdenv.hostPlatform.uname.system;
|
||||
embeddedOnBinaryTools =
|
||||
|
@ -60,15 +60,15 @@ let
|
|||
in
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "hare";
|
||||
version = "unstable-2023-11-27";
|
||||
version = "0-unstable-2024-02-01";
|
||||
|
||||
outputs = [ "out" "man" ];
|
||||
|
||||
src = fetchFromSourcehut {
|
||||
owner = "~sircmpwn";
|
||||
repo = "hare";
|
||||
rev = "d94f355481a320fb2aec13ef62cb3bfe2416f5e4";
|
||||
hash = "sha256-Mpl3VO4xvLCKHeYr/FPuS6jl8CkyeqDz18mQ6Zv05oc=";
|
||||
rev = "4d387ed61968f468e43571d15485b498e28acaec";
|
||||
hash = "sha256-vVL8e+P/lnp0/jO+lQ/q0CehwxAvXh+FPOMJ8r+2Ftk=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
|
@ -96,7 +96,6 @@ stdenv.mkDerivation (finalAttrs: {
|
|||
makeFlags = [
|
||||
"HARECACHE=.harecache"
|
||||
"PREFIX=${builtins.placeholder "out"}"
|
||||
"PLATFORM=${platform}"
|
||||
"ARCH=${arch}"
|
||||
# Strip the variable of an empty $(SRCDIR)/hare/third-party, since nix does
|
||||
# not follow the FHS.
|
||||
|
@ -122,8 +121,8 @@ stdenv.mkDerivation (finalAttrs: {
|
|||
|
||||
doCheck = true;
|
||||
|
||||
preConfigure = ''
|
||||
ln -s config.example.mk config.mk
|
||||
postConfigure = ''
|
||||
ln -s configs/${platform}.mk config.mk
|
||||
'';
|
||||
|
||||
postFixup = ''
|
||||
|
@ -134,6 +133,7 @@ stdenv.mkDerivation (finalAttrs: {
|
|||
setupHook = ./setup-hook.sh;
|
||||
|
||||
passthru = {
|
||||
updateScript = unstableGitUpdater { };
|
||||
tests = lib.optionalAttrs enableCrossCompilation {
|
||||
crossCompilation = callPackage ./cross-compilation-tests.nix {
|
||||
hare = finalAttrs.finalPackage;
|
||||
|
|
|
@ -3,29 +3,33 @@
|
|||
, fetchFromSourcehut
|
||||
, qbe
|
||||
, fetchgit
|
||||
, unstableGitUpdater
|
||||
}:
|
||||
let
|
||||
# harec needs the dbgfile and dbgloc features implemented up to this commit.
|
||||
# This can be dropped once 1.2 is released, for a possible release date see:
|
||||
# This can be dropped once 1.2 is released. For a possible release date, see:
|
||||
# https://lists.sr.ht/~mpu/qbe/%3CZPkmHE9KLohoEohE%40cloudsdale.the-delta.net.eu.org%3E
|
||||
qbe' = qbe.overrideAttrs (_old: {
|
||||
version = "1.1-unstable-2023-08-18";
|
||||
version = "1.1-unstable-2024-01-12";
|
||||
src = fetchgit {
|
||||
url = "git://c9x.me/qbe.git";
|
||||
rev = "36946a5142c40b733d25ea5ca469f7949ee03439";
|
||||
hash = "sha256-bqxWFP3/aw7kRoD6ictbFcjzijktHvh4AgWAXBIODW8=";
|
||||
rev = "85287081c4a25785dec1ec48c488a5879b3c37ac";
|
||||
hash = "sha256-7bVbxUU/HXJXLtAxhoK0URmPtjGwMSZrPkx8WKl52Mg=";
|
||||
};
|
||||
});
|
||||
|
||||
platform = lib.toLower stdenv.hostPlatform.uname.system;
|
||||
arch = stdenv.hostPlatform.uname.processor;
|
||||
in
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "harec";
|
||||
version = "unstable-2023-11-29";
|
||||
version = "0-unstable-2024-01-29";
|
||||
|
||||
src = fetchFromSourcehut {
|
||||
owner = "~sircmpwn";
|
||||
repo = "harec";
|
||||
rev = "ec3193e3870436180b0f3df82b769adc57a1c099";
|
||||
hash = "sha256-HXQIgFC4YVDJjo5xbyg1ea3jWYKLEwKkD1KFzWFz9UI= ";
|
||||
rev = "f9e17e633845d8d38566b4ea32db0a29ac85d96e";
|
||||
hash = "sha256-Xy9VOcDtbJUz3z6Vk8bqH41VbAFKtJ9fzPGEwVz8KQM=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
@ -36,15 +40,26 @@ stdenv.mkDerivation (finalAttrs: {
|
|||
qbe'
|
||||
];
|
||||
|
||||
makeFlags = [
|
||||
"PREFIX=${builtins.placeholder "out"}"
|
||||
"ARCH=${arch}"
|
||||
];
|
||||
|
||||
strictDeps = true;
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
doCheck = true;
|
||||
|
||||
postConfigure = ''
|
||||
ln -s configs/${platform}.mk config.mk
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
# We create this attribute so that the `hare` package can access the
|
||||
# overwritten `qbe`.
|
||||
qbeUnstable = qbe';
|
||||
updateScript = unstableGitUpdater { };
|
||||
};
|
||||
|
||||
meta = {
|
||||
|
@ -57,7 +72,7 @@ stdenv.mkDerivation (finalAttrs: {
|
|||
# https://harelang.org/platforms/
|
||||
# UPDATE: https://github.com/hshq/harelang provides a MacOS port
|
||||
platforms = with lib.platforms;
|
||||
lib.intersectLists (freebsd ++ linux) (aarch64 ++ x86_64 ++ riscv64);
|
||||
lib.intersectLists (freebsd ++ openbsd ++ linux) (aarch64 ++ x86_64 ++ riscv64);
|
||||
badPlatforms = lib.platforms.darwin;
|
||||
};
|
||||
})
|
||||
|
|
|
@ -7,13 +7,13 @@
|
|||
|
||||
stdenv.mkDerivation {
|
||||
pname = "hare-ev";
|
||||
version = "unstable-2023-12-04";
|
||||
version = "0-unstable-2024-01-04";
|
||||
|
||||
src = fetchFromSourcehut {
|
||||
owner = "~sircmpwn";
|
||||
repo = "hare-ev";
|
||||
rev = "e3c3f7613c602672ac41a3e47c106a5bd27a2378";
|
||||
hash = "sha256-TQsR2lXJfkPu53WpJy/K+Jruyfw8mCkEIE9DbFQoS+s=";
|
||||
rev = "736ab9bb17257ee5eba3bc96f6650fc4a14608ea";
|
||||
hash = "sha256-SXExwDZKlW/2XYzmJUhkLWj6NF/znrv3vY9V0mD5iFQ=";
|
||||
};
|
||||
|
||||
nativeCheckInputs = [
|
||||
|
|
|
@ -3,36 +3,20 @@
|
|||
, scdoc
|
||||
, lib
|
||||
, fetchFromGitea
|
||||
, fetchpatch
|
||||
, nix-update-script
|
||||
}:
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "hare-toml";
|
||||
version = "0.1.0";
|
||||
version = "0.1.0-unstable-2023-12-27";
|
||||
|
||||
src = fetchFromGitea {
|
||||
domain = "codeberg.org";
|
||||
owner = "lunacb";
|
||||
repo = "hare-toml";
|
||||
rev = "v${finalAttrs.version}";
|
||||
hash = "sha256-JKK5CcDmAW7FH7AzFwgsr9i13eRSXDUokWfZix7f4yY=";
|
||||
rev = "022d0a8d59e5518029f72724a46e6133b934774c";
|
||||
hash = "sha256-DsVcbh1zn8GNKzzb+1o6bfgiVigrxHw/5Xm3uuUhRy0=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# Remove `abort()` calls from never returning expressions.
|
||||
(fetchpatch {
|
||||
name = "remove-abort-from-never-returning-expressions.patch";
|
||||
url = "https://codeberg.org/lunacb/hare-toml/commit/f26e7cdfdccd2e82c9fce7e9fca8644b825b40f1.patch";
|
||||
hash = "sha256-DFbrxiaV4lQlFmMzo5GbMubIQ4hU3lXgsJqoyeFWf2g=";
|
||||
})
|
||||
# Fix make's install target to install the correct files
|
||||
(fetchpatch {
|
||||
name = "install-correct-files-with-install-target.patch";
|
||||
url = "https://codeberg.org/lunacb/hare-toml/commit/b79021911fe7025a8f5ddd97deb2c4d18c67b25e.patch";
|
||||
hash = "sha256-IL+faumX6BmdyePXTzsSGgUlgDBqOXXzShupVAa7jlQ=";
|
||||
})
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
scdoc
|
||||
hare
|
||||
|
|
Loading…
Reference in a new issue