nixpkgs/pkgs/by-name/ha/hare/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

169 lines
4.8 KiB
Nix
Raw Normal View History

hare: unstable-2023-04-23 -> unstable-2023-10-22; harec: unstable-2023-04-23 -> unstable-2023-10-23 And also the following refactoring: hare: 1. Replace `NIX_BUILD_TOP` usage with `mktemp` 2. Enable parallel building 3. Get rid of `config-template.mk`, by using `makeFlagsArray` instead 4. Move `wrapProgram` call to `postFixup` 5. Set the `LOCALVER` environment variable to `nix`, so that the `hare version` command outputs `dev-nix`[1] 6. Set `meta` attribute `mainProgram` 7. Make the package accessible through `all-packages.nix` instead of `aliases.nix` 8. Move package path from `pkgs/development/compilers/hare/hare` to `pkgs/development/compilers/hare`, since the scope is now made at `pkgs/top-level/hare-packages.nix` harec: 1. Remove `hardeningDisable = [ "fortify" ];`, since both harec and hare compile normally with it enabled 2. Enable parallel building 3. Set `meta` attribute `mainProgram` 4. Make the package accessible through `all-packages.nix` instead of `aliases.nix` 5. Move package path from `pkgs/development/compilers/hare/harec` to `pkgs/development/compilers/harec`, since the scope is now made at `pkgs/top-level/hare-packages.nix` harePackages: 1. Move hare packages scope from `pkgs/development/compilers/hare/default.nix` to `pkgs/top-level/hare-packages.nix` 2. Remove `hare` and `harec` from `aliases.nix`, moving them to `all-packages.nix` 3. Change the `callPackage` argument in `all-packages.nix` from `../development/compilers/hare` to `./hare-packages.nix` [1]: https://git.sr.ht/~sircmpwn/hare/tree/1048620a7a25134db370bf24736efff1ffcb2483/item/scripts/version#L2 Co-authored-by: starzation <nixpkgs@starzation.net>
2023-11-08 00:25:05 +00:00
{ lib
, stdenv
, fetchFromSourcehut
, binutils-unwrapped
, harec
, makeWrapper
, qbe
, gitUpdater
hare: unstable-2023-04-23 -> unstable-2023-10-22; harec: unstable-2023-04-23 -> unstable-2023-10-23 And also the following refactoring: hare: 1. Replace `NIX_BUILD_TOP` usage with `mktemp` 2. Enable parallel building 3. Get rid of `config-template.mk`, by using `makeFlagsArray` instead 4. Move `wrapProgram` call to `postFixup` 5. Set the `LOCALVER` environment variable to `nix`, so that the `hare version` command outputs `dev-nix`[1] 6. Set `meta` attribute `mainProgram` 7. Make the package accessible through `all-packages.nix` instead of `aliases.nix` 8. Move package path from `pkgs/development/compilers/hare/hare` to `pkgs/development/compilers/hare`, since the scope is now made at `pkgs/top-level/hare-packages.nix` harec: 1. Remove `hardeningDisable = [ "fortify" ];`, since both harec and hare compile normally with it enabled 2. Enable parallel building 3. Set `meta` attribute `mainProgram` 4. Make the package accessible through `all-packages.nix` instead of `aliases.nix` 5. Move package path from `pkgs/development/compilers/hare/harec` to `pkgs/development/compilers/harec`, since the scope is now made at `pkgs/top-level/hare-packages.nix` harePackages: 1. Move hare packages scope from `pkgs/development/compilers/hare/default.nix` to `pkgs/top-level/hare-packages.nix` 2. Remove `hare` and `harec` from `aliases.nix`, moving them to `all-packages.nix` 3. Change the `callPackage` argument in `all-packages.nix` from `../development/compilers/hare` to `./hare-packages.nix` [1]: https://git.sr.ht/~sircmpwn/hare/tree/1048620a7a25134db370bf24736efff1ffcb2483/item/scripts/version#L2 Co-authored-by: starzation <nixpkgs@starzation.net>
2023-11-08 00:25:05 +00:00
, scdoc
, tzdata
, substituteAll
2024-03-01 16:18:05 +00:00
, fetchpatch
, callPackage
, enableCrossCompilation ? (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.is64bit)
, pkgsCross
, x86_64PkgsCrossToolchain ? pkgsCross.gnu64
, aarch64PkgsCrossToolchain ? pkgsCross.aarch64-multiplatform
, riscv64PkgsCrossToolchain ? pkgsCross.riscv64
hare: unstable-2023-04-23 -> unstable-2023-10-22; harec: unstable-2023-04-23 -> unstable-2023-10-23 And also the following refactoring: hare: 1. Replace `NIX_BUILD_TOP` usage with `mktemp` 2. Enable parallel building 3. Get rid of `config-template.mk`, by using `makeFlagsArray` instead 4. Move `wrapProgram` call to `postFixup` 5. Set the `LOCALVER` environment variable to `nix`, so that the `hare version` command outputs `dev-nix`[1] 6. Set `meta` attribute `mainProgram` 7. Make the package accessible through `all-packages.nix` instead of `aliases.nix` 8. Move package path from `pkgs/development/compilers/hare/hare` to `pkgs/development/compilers/hare`, since the scope is now made at `pkgs/top-level/hare-packages.nix` harec: 1. Remove `hardeningDisable = [ "fortify" ];`, since both harec and hare compile normally with it enabled 2. Enable parallel building 3. Set `meta` attribute `mainProgram` 4. Make the package accessible through `all-packages.nix` instead of `aliases.nix` 5. Move package path from `pkgs/development/compilers/hare/harec` to `pkgs/development/compilers/harec`, since the scope is now made at `pkgs/top-level/hare-packages.nix` harePackages: 1. Move hare packages scope from `pkgs/development/compilers/hare/default.nix` to `pkgs/top-level/hare-packages.nix` 2. Remove `hare` and `harec` from `aliases.nix`, moving them to `all-packages.nix` 3. Change the `callPackage` argument in `all-packages.nix` from `../development/compilers/hare` to `./hare-packages.nix` [1]: https://git.sr.ht/~sircmpwn/hare/tree/1048620a7a25134db370bf24736efff1ffcb2483/item/scripts/version#L2 Co-authored-by: starzation <nixpkgs@starzation.net>
2023-11-08 00:25:05 +00:00
}:
# 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;
inherit (lib) intersectLists platforms concatStringsSep;
workingPlatforms = intersectLists platforms.linux (with platforms; x86_64 ++ aarch64 ++ riscv64);
in
(enableCrossCompilation -> !(isLinux && is64bit))
-> builtins.throw ''
The cross-compilation toolchains may only be enabled on the following platforms:
${concatStringsSep "\n" workingPlatforms}
'';
hare: unstable-2023-04-23 -> unstable-2023-10-22; harec: unstable-2023-04-23 -> unstable-2023-10-23 And also the following refactoring: hare: 1. Replace `NIX_BUILD_TOP` usage with `mktemp` 2. Enable parallel building 3. Get rid of `config-template.mk`, by using `makeFlagsArray` instead 4. Move `wrapProgram` call to `postFixup` 5. Set the `LOCALVER` environment variable to `nix`, so that the `hare version` command outputs `dev-nix`[1] 6. Set `meta` attribute `mainProgram` 7. Make the package accessible through `all-packages.nix` instead of `aliases.nix` 8. Move package path from `pkgs/development/compilers/hare/hare` to `pkgs/development/compilers/hare`, since the scope is now made at `pkgs/top-level/hare-packages.nix` harec: 1. Remove `hardeningDisable = [ "fortify" ];`, since both harec and hare compile normally with it enabled 2. Enable parallel building 3. Set `meta` attribute `mainProgram` 4. Make the package accessible through `all-packages.nix` instead of `aliases.nix` 5. Move package path from `pkgs/development/compilers/hare/harec` to `pkgs/development/compilers/harec`, since the scope is now made at `pkgs/top-level/hare-packages.nix` harePackages: 1. Move hare packages scope from `pkgs/development/compilers/hare/default.nix` to `pkgs/top-level/hare-packages.nix` 2. Remove `hare` and `harec` from `aliases.nix`, moving them to `all-packages.nix` 3. Change the `callPackage` argument in `all-packages.nix` from `../development/compilers/hare` to `./hare-packages.nix` [1]: https://git.sr.ht/~sircmpwn/hare/tree/1048620a7a25134db370bf24736efff1ffcb2483/item/scripts/version#L2 Co-authored-by: starzation <nixpkgs@starzation.net>
2023-11-08 00:25:05 +00:00
let
arch = stdenv.hostPlatform.uname.processor;
2024-03-01 16:18:05 +00:00
qbePlatform = {
x86_64 = "amd64_sysv";
aarch64 = "arm64";
riscv64 = "rv64";
}.${arch};
platform = lib.toLower stdenv.hostPlatform.uname.system;
embeddedOnBinaryTools =
let
genToolsFromToolchain = toolchain:
let
crossTargetPrefix = toolchain.stdenv.cc.targetPrefix;
toolchainArch = toolchain.stdenv.hostPlatform.uname.processor;
absOrRelPath = toolDrv: toolBasename:
if arch == toolchainArch then toolBasename
else lib.getExe' toolDrv "${crossTargetPrefix}${toolBasename}";
in
{
"ld" = absOrRelPath toolchain.buildPackages.binutils "ld";
"as" = absOrRelPath toolchain.buildPackages.binutils "as";
"cc" = absOrRelPath toolchain.stdenv.cc "cc";
};
in
{
x86_64 = genToolsFromToolchain x86_64PkgsCrossToolchain;
aarch64 = genToolsFromToolchain aarch64PkgsCrossToolchain;
riscv64 = genToolsFromToolchain riscv64PkgsCrossToolchain;
};
hare: unstable-2023-04-23 -> unstable-2023-10-22; harec: unstable-2023-04-23 -> unstable-2023-10-23 And also the following refactoring: hare: 1. Replace `NIX_BUILD_TOP` usage with `mktemp` 2. Enable parallel building 3. Get rid of `config-template.mk`, by using `makeFlagsArray` instead 4. Move `wrapProgram` call to `postFixup` 5. Set the `LOCALVER` environment variable to `nix`, so that the `hare version` command outputs `dev-nix`[1] 6. Set `meta` attribute `mainProgram` 7. Make the package accessible through `all-packages.nix` instead of `aliases.nix` 8. Move package path from `pkgs/development/compilers/hare/hare` to `pkgs/development/compilers/hare`, since the scope is now made at `pkgs/top-level/hare-packages.nix` harec: 1. Remove `hardeningDisable = [ "fortify" ];`, since both harec and hare compile normally with it enabled 2. Enable parallel building 3. Set `meta` attribute `mainProgram` 4. Make the package accessible through `all-packages.nix` instead of `aliases.nix` 5. Move package path from `pkgs/development/compilers/hare/harec` to `pkgs/development/compilers/harec`, since the scope is now made at `pkgs/top-level/hare-packages.nix` harePackages: 1. Move hare packages scope from `pkgs/development/compilers/hare/default.nix` to `pkgs/top-level/hare-packages.nix` 2. Remove `hare` and `harec` from `aliases.nix`, moving them to `all-packages.nix` 3. Change the `callPackage` argument in `all-packages.nix` from `../development/compilers/hare` to `./hare-packages.nix` [1]: https://git.sr.ht/~sircmpwn/hare/tree/1048620a7a25134db370bf24736efff1ffcb2483/item/scripts/version#L2 Co-authored-by: starzation <nixpkgs@starzation.net>
2023-11-08 00:25:05 +00:00
in
stdenv.mkDerivation (finalAttrs: {
pname = "hare";
version = "0.24.0";
outputs = [ "out" "man" ];
hare: unstable-2023-04-23 -> unstable-2023-10-22; harec: unstable-2023-04-23 -> unstable-2023-10-23 And also the following refactoring: hare: 1. Replace `NIX_BUILD_TOP` usage with `mktemp` 2. Enable parallel building 3. Get rid of `config-template.mk`, by using `makeFlagsArray` instead 4. Move `wrapProgram` call to `postFixup` 5. Set the `LOCALVER` environment variable to `nix`, so that the `hare version` command outputs `dev-nix`[1] 6. Set `meta` attribute `mainProgram` 7. Make the package accessible through `all-packages.nix` instead of `aliases.nix` 8. Move package path from `pkgs/development/compilers/hare/hare` to `pkgs/development/compilers/hare`, since the scope is now made at `pkgs/top-level/hare-packages.nix` harec: 1. Remove `hardeningDisable = [ "fortify" ];`, since both harec and hare compile normally with it enabled 2. Enable parallel building 3. Set `meta` attribute `mainProgram` 4. Make the package accessible through `all-packages.nix` instead of `aliases.nix` 5. Move package path from `pkgs/development/compilers/hare/harec` to `pkgs/development/compilers/harec`, since the scope is now made at `pkgs/top-level/hare-packages.nix` harePackages: 1. Move hare packages scope from `pkgs/development/compilers/hare/default.nix` to `pkgs/top-level/hare-packages.nix` 2. Remove `hare` and `harec` from `aliases.nix`, moving them to `all-packages.nix` 3. Change the `callPackage` argument in `all-packages.nix` from `../development/compilers/hare` to `./hare-packages.nix` [1]: https://git.sr.ht/~sircmpwn/hare/tree/1048620a7a25134db370bf24736efff1ffcb2483/item/scripts/version#L2 Co-authored-by: starzation <nixpkgs@starzation.net>
2023-11-08 00:25:05 +00:00
src = fetchFromSourcehut {
owner = "~sircmpwn";
repo = "hare";
rev = finalAttrs.version;
hash = "sha256-3T+BdNj+Th8QXrcsPMWlN9GBfuMF1ulneWHpDEtyBU8=";
hare: unstable-2023-04-23 -> unstable-2023-10-22; harec: unstable-2023-04-23 -> unstable-2023-10-23 And also the following refactoring: hare: 1. Replace `NIX_BUILD_TOP` usage with `mktemp` 2. Enable parallel building 3. Get rid of `config-template.mk`, by using `makeFlagsArray` instead 4. Move `wrapProgram` call to `postFixup` 5. Set the `LOCALVER` environment variable to `nix`, so that the `hare version` command outputs `dev-nix`[1] 6. Set `meta` attribute `mainProgram` 7. Make the package accessible through `all-packages.nix` instead of `aliases.nix` 8. Move package path from `pkgs/development/compilers/hare/hare` to `pkgs/development/compilers/hare`, since the scope is now made at `pkgs/top-level/hare-packages.nix` harec: 1. Remove `hardeningDisable = [ "fortify" ];`, since both harec and hare compile normally with it enabled 2. Enable parallel building 3. Set `meta` attribute `mainProgram` 4. Make the package accessible through `all-packages.nix` instead of `aliases.nix` 5. Move package path from `pkgs/development/compilers/hare/harec` to `pkgs/development/compilers/harec`, since the scope is now made at `pkgs/top-level/hare-packages.nix` harePackages: 1. Move hare packages scope from `pkgs/development/compilers/hare/default.nix` to `pkgs/top-level/hare-packages.nix` 2. Remove `hare` and `harec` from `aliases.nix`, moving them to `all-packages.nix` 3. Change the `callPackage` argument in `all-packages.nix` from `../development/compilers/hare` to `./hare-packages.nix` [1]: https://git.sr.ht/~sircmpwn/hare/tree/1048620a7a25134db370bf24736efff1ffcb2483/item/scripts/version#L2 Co-authored-by: starzation <nixpkgs@starzation.net>
2023-11-08 00:25:05 +00:00
};
patches = [
# Replace FHS paths with nix store
(substituteAll {
src = ./001-tzdata.patch;
inherit tzdata;
})
2024-03-01 16:18:05 +00:00
# Use correct comment syntax for debug+riscv64.
(fetchpatch {
url = "https://git.sr.ht/~sircmpwn/hare/commit/80e45e4d931a6e90d999846b86471cac00d2a6d5.patch";
hash = "sha256-S7nXpiO0tYnKpmpj+fLkolGeHb1TrmgKlMF0+j0qLPQ=";
})
# Don't build haredoc since it uses the build `hare` bin, which breaks
# cross-compilation.
./002-dont-build-haredoc.patch
];
hare: unstable-2023-04-23 -> unstable-2023-10-22; harec: unstable-2023-04-23 -> unstable-2023-10-23 And also the following refactoring: hare: 1. Replace `NIX_BUILD_TOP` usage with `mktemp` 2. Enable parallel building 3. Get rid of `config-template.mk`, by using `makeFlagsArray` instead 4. Move `wrapProgram` call to `postFixup` 5. Set the `LOCALVER` environment variable to `nix`, so that the `hare version` command outputs `dev-nix`[1] 6. Set `meta` attribute `mainProgram` 7. Make the package accessible through `all-packages.nix` instead of `aliases.nix` 8. Move package path from `pkgs/development/compilers/hare/hare` to `pkgs/development/compilers/hare`, since the scope is now made at `pkgs/top-level/hare-packages.nix` harec: 1. Remove `hardeningDisable = [ "fortify" ];`, since both harec and hare compile normally with it enabled 2. Enable parallel building 3. Set `meta` attribute `mainProgram` 4. Make the package accessible through `all-packages.nix` instead of `aliases.nix` 5. Move package path from `pkgs/development/compilers/hare/harec` to `pkgs/development/compilers/harec`, since the scope is now made at `pkgs/top-level/hare-packages.nix` harePackages: 1. Move hare packages scope from `pkgs/development/compilers/hare/default.nix` to `pkgs/top-level/hare-packages.nix` 2. Remove `hare` and `harec` from `aliases.nix`, moving them to `all-packages.nix` 3. Change the `callPackage` argument in `all-packages.nix` from `../development/compilers/hare` to `./hare-packages.nix` [1]: https://git.sr.ht/~sircmpwn/hare/tree/1048620a7a25134db370bf24736efff1ffcb2483/item/scripts/version#L2 Co-authored-by: starzation <nixpkgs@starzation.net>
2023-11-08 00:25:05 +00:00
nativeBuildInputs = [
harec
makeWrapper
qbe
scdoc
];
buildInputs = [
binutils-unwrapped
harec
qbe
tzdata
hare: unstable-2023-04-23 -> unstable-2023-10-22; harec: unstable-2023-04-23 -> unstable-2023-10-23 And also the following refactoring: hare: 1. Replace `NIX_BUILD_TOP` usage with `mktemp` 2. Enable parallel building 3. Get rid of `config-template.mk`, by using `makeFlagsArray` instead 4. Move `wrapProgram` call to `postFixup` 5. Set the `LOCALVER` environment variable to `nix`, so that the `hare version` command outputs `dev-nix`[1] 6. Set `meta` attribute `mainProgram` 7. Make the package accessible through `all-packages.nix` instead of `aliases.nix` 8. Move package path from `pkgs/development/compilers/hare/hare` to `pkgs/development/compilers/hare`, since the scope is now made at `pkgs/top-level/hare-packages.nix` harec: 1. Remove `hardeningDisable = [ "fortify" ];`, since both harec and hare compile normally with it enabled 2. Enable parallel building 3. Set `meta` attribute `mainProgram` 4. Make the package accessible through `all-packages.nix` instead of `aliases.nix` 5. Move package path from `pkgs/development/compilers/hare/harec` to `pkgs/development/compilers/harec`, since the scope is now made at `pkgs/top-level/hare-packages.nix` harePackages: 1. Move hare packages scope from `pkgs/development/compilers/hare/default.nix` to `pkgs/top-level/hare-packages.nix` 2. Remove `hare` and `harec` from `aliases.nix`, moving them to `all-packages.nix` 3. Change the `callPackage` argument in `all-packages.nix` from `../development/compilers/hare` to `./hare-packages.nix` [1]: https://git.sr.ht/~sircmpwn/hare/tree/1048620a7a25134db370bf24736efff1ffcb2483/item/scripts/version#L2 Co-authored-by: starzation <nixpkgs@starzation.net>
2023-11-08 00:25:05 +00:00
];
makeFlags = [
"HARECACHE=.harecache"
"PREFIX=${builtins.placeholder "out"}"
"ARCH=${arch}"
"VERSION=${finalAttrs.version}-nixpkgs"
2024-03-01 16:18:05 +00:00
"QBEFLAGS=-t${qbePlatform}"
"CC=${stdenv.cc.targetPrefix}cc"
"AS=${stdenv.cc.targetPrefix}as"
"LD=${stdenv.cc.targetPrefix}ld"
# Strip the variable of an empty $(SRCDIR)/hare/third-party, since nix does
# not follow the FHS.
"HAREPATH=$(SRCDIR)/hare/stdlib"
] ++ lib.optionals enableCrossCompilation [
"RISCV64_AS=${embeddedOnBinaryTools.riscv64.as}"
"RISCV64_CC=${embeddedOnBinaryTools.riscv64.cc}"
"RISCV64_LD=${embeddedOnBinaryTools.riscv64.ld}"
"AARCH64_AS=${embeddedOnBinaryTools.aarch64.as}"
"AARCH64_CC=${embeddedOnBinaryTools.aarch64.cc}"
"AARCH64_LD=${embeddedOnBinaryTools.aarch64.ld}"
"x86_64_AS=${embeddedOnBinaryTools.x86_64.as}"
"x86_64_CC=${embeddedOnBinaryTools.x86_64.cc}"
"x86_64_LD=${embeddedOnBinaryTools.x86_64.ld}"
];
hare: unstable-2023-04-23 -> unstable-2023-10-22; harec: unstable-2023-04-23 -> unstable-2023-10-23 And also the following refactoring: hare: 1. Replace `NIX_BUILD_TOP` usage with `mktemp` 2. Enable parallel building 3. Get rid of `config-template.mk`, by using `makeFlagsArray` instead 4. Move `wrapProgram` call to `postFixup` 5. Set the `LOCALVER` environment variable to `nix`, so that the `hare version` command outputs `dev-nix`[1] 6. Set `meta` attribute `mainProgram` 7. Make the package accessible through `all-packages.nix` instead of `aliases.nix` 8. Move package path from `pkgs/development/compilers/hare/hare` to `pkgs/development/compilers/hare`, since the scope is now made at `pkgs/top-level/hare-packages.nix` harec: 1. Remove `hardeningDisable = [ "fortify" ];`, since both harec and hare compile normally with it enabled 2. Enable parallel building 3. Set `meta` attribute `mainProgram` 4. Make the package accessible through `all-packages.nix` instead of `aliases.nix` 5. Move package path from `pkgs/development/compilers/hare/harec` to `pkgs/development/compilers/harec`, since the scope is now made at `pkgs/top-level/hare-packages.nix` harePackages: 1. Move hare packages scope from `pkgs/development/compilers/hare/default.nix` to `pkgs/top-level/hare-packages.nix` 2. Remove `hare` and `harec` from `aliases.nix`, moving them to `all-packages.nix` 3. Change the `callPackage` argument in `all-packages.nix` from `../development/compilers/hare` to `./hare-packages.nix` [1]: https://git.sr.ht/~sircmpwn/hare/tree/1048620a7a25134db370bf24736efff1ffcb2483/item/scripts/version#L2 Co-authored-by: starzation <nixpkgs@starzation.net>
2023-11-08 00:25:05 +00:00
enableParallelBuilding = true;
hare: unstable-2023-04-23 -> unstable-2023-10-22; harec: unstable-2023-04-23 -> unstable-2023-10-23 And also the following refactoring: hare: 1. Replace `NIX_BUILD_TOP` usage with `mktemp` 2. Enable parallel building 3. Get rid of `config-template.mk`, by using `makeFlagsArray` instead 4. Move `wrapProgram` call to `postFixup` 5. Set the `LOCALVER` environment variable to `nix`, so that the `hare version` command outputs `dev-nix`[1] 6. Set `meta` attribute `mainProgram` 7. Make the package accessible through `all-packages.nix` instead of `aliases.nix` 8. Move package path from `pkgs/development/compilers/hare/hare` to `pkgs/development/compilers/hare`, since the scope is now made at `pkgs/top-level/hare-packages.nix` harec: 1. Remove `hardeningDisable = [ "fortify" ];`, since both harec and hare compile normally with it enabled 2. Enable parallel building 3. Set `meta` attribute `mainProgram` 4. Make the package accessible through `all-packages.nix` instead of `aliases.nix` 5. Move package path from `pkgs/development/compilers/hare/harec` to `pkgs/development/compilers/harec`, since the scope is now made at `pkgs/top-level/hare-packages.nix` harePackages: 1. Move hare packages scope from `pkgs/development/compilers/hare/default.nix` to `pkgs/top-level/hare-packages.nix` 2. Remove `hare` and `harec` from `aliases.nix`, moving them to `all-packages.nix` 3. Change the `callPackage` argument in `all-packages.nix` from `../development/compilers/hare` to `./hare-packages.nix` [1]: https://git.sr.ht/~sircmpwn/hare/tree/1048620a7a25134db370bf24736efff1ffcb2483/item/scripts/version#L2 Co-authored-by: starzation <nixpkgs@starzation.net>
2023-11-08 00:25:05 +00:00
# Append the distribution name to the version
env.LOCALVER = "nixpkgs";
hare: unstable-2023-04-23 -> unstable-2023-10-22; harec: unstable-2023-04-23 -> unstable-2023-10-23 And also the following refactoring: hare: 1. Replace `NIX_BUILD_TOP` usage with `mktemp` 2. Enable parallel building 3. Get rid of `config-template.mk`, by using `makeFlagsArray` instead 4. Move `wrapProgram` call to `postFixup` 5. Set the `LOCALVER` environment variable to `nix`, so that the `hare version` command outputs `dev-nix`[1] 6. Set `meta` attribute `mainProgram` 7. Make the package accessible through `all-packages.nix` instead of `aliases.nix` 8. Move package path from `pkgs/development/compilers/hare/hare` to `pkgs/development/compilers/hare`, since the scope is now made at `pkgs/top-level/hare-packages.nix` harec: 1. Remove `hardeningDisable = [ "fortify" ];`, since both harec and hare compile normally with it enabled 2. Enable parallel building 3. Set `meta` attribute `mainProgram` 4. Make the package accessible through `all-packages.nix` instead of `aliases.nix` 5. Move package path from `pkgs/development/compilers/hare/harec` to `pkgs/development/compilers/harec`, since the scope is now made at `pkgs/top-level/hare-packages.nix` harePackages: 1. Move hare packages scope from `pkgs/development/compilers/hare/default.nix` to `pkgs/top-level/hare-packages.nix` 2. Remove `hare` and `harec` from `aliases.nix`, moving them to `all-packages.nix` 3. Change the `callPackage` argument in `all-packages.nix` from `../development/compilers/hare` to `./hare-packages.nix` [1]: https://git.sr.ht/~sircmpwn/hare/tree/1048620a7a25134db370bf24736efff1ffcb2483/item/scripts/version#L2 Co-authored-by: starzation <nixpkgs@starzation.net>
2023-11-08 00:25:05 +00:00
strictDeps = true;
hare: unstable-2023-04-23 -> unstable-2023-10-22; harec: unstable-2023-04-23 -> unstable-2023-10-23 And also the following refactoring: hare: 1. Replace `NIX_BUILD_TOP` usage with `mktemp` 2. Enable parallel building 3. Get rid of `config-template.mk`, by using `makeFlagsArray` instead 4. Move `wrapProgram` call to `postFixup` 5. Set the `LOCALVER` environment variable to `nix`, so that the `hare version` command outputs `dev-nix`[1] 6. Set `meta` attribute `mainProgram` 7. Make the package accessible through `all-packages.nix` instead of `aliases.nix` 8. Move package path from `pkgs/development/compilers/hare/hare` to `pkgs/development/compilers/hare`, since the scope is now made at `pkgs/top-level/hare-packages.nix` harec: 1. Remove `hardeningDisable = [ "fortify" ];`, since both harec and hare compile normally with it enabled 2. Enable parallel building 3. Set `meta` attribute `mainProgram` 4. Make the package accessible through `all-packages.nix` instead of `aliases.nix` 5. Move package path from `pkgs/development/compilers/hare/harec` to `pkgs/development/compilers/harec`, since the scope is now made at `pkgs/top-level/hare-packages.nix` harePackages: 1. Move hare packages scope from `pkgs/development/compilers/hare/default.nix` to `pkgs/top-level/hare-packages.nix` 2. Remove `hare` and `harec` from `aliases.nix`, moving them to `all-packages.nix` 3. Change the `callPackage` argument in `all-packages.nix` from `../development/compilers/hare` to `./hare-packages.nix` [1]: https://git.sr.ht/~sircmpwn/hare/tree/1048620a7a25134db370bf24736efff1ffcb2483/item/scripts/version#L2 Co-authored-by: starzation <nixpkgs@starzation.net>
2023-11-08 00:25:05 +00:00
doCheck = true;
postConfigure = ''
ln -s configs/${platform}.mk config.mk
'';
hare: unstable-2023-04-23 -> unstable-2023-10-22; harec: unstable-2023-04-23 -> unstable-2023-10-23 And also the following refactoring: hare: 1. Replace `NIX_BUILD_TOP` usage with `mktemp` 2. Enable parallel building 3. Get rid of `config-template.mk`, by using `makeFlagsArray` instead 4. Move `wrapProgram` call to `postFixup` 5. Set the `LOCALVER` environment variable to `nix`, so that the `hare version` command outputs `dev-nix`[1] 6. Set `meta` attribute `mainProgram` 7. Make the package accessible through `all-packages.nix` instead of `aliases.nix` 8. Move package path from `pkgs/development/compilers/hare/hare` to `pkgs/development/compilers/hare`, since the scope is now made at `pkgs/top-level/hare-packages.nix` harec: 1. Remove `hardeningDisable = [ "fortify" ];`, since both harec and hare compile normally with it enabled 2. Enable parallel building 3. Set `meta` attribute `mainProgram` 4. Make the package accessible through `all-packages.nix` instead of `aliases.nix` 5. Move package path from `pkgs/development/compilers/hare/harec` to `pkgs/development/compilers/harec`, since the scope is now made at `pkgs/top-level/hare-packages.nix` harePackages: 1. Move hare packages scope from `pkgs/development/compilers/hare/default.nix` to `pkgs/top-level/hare-packages.nix` 2. Remove `hare` and `harec` from `aliases.nix`, moving them to `all-packages.nix` 3. Change the `callPackage` argument in `all-packages.nix` from `../development/compilers/hare` to `./hare-packages.nix` [1]: https://git.sr.ht/~sircmpwn/hare/tree/1048620a7a25134db370bf24736efff1ffcb2483/item/scripts/version#L2 Co-authored-by: starzation <nixpkgs@starzation.net>
2023-11-08 00:25:05 +00:00
postFixup = ''
wrapProgram $out/bin/hare \
--prefix PATH : ${lib.makeBinPath [binutils-unwrapped harec qbe]}
'';
hare: unstable-2023-04-23 -> unstable-2023-10-22; harec: unstable-2023-04-23 -> unstable-2023-10-23 And also the following refactoring: hare: 1. Replace `NIX_BUILD_TOP` usage with `mktemp` 2. Enable parallel building 3. Get rid of `config-template.mk`, by using `makeFlagsArray` instead 4. Move `wrapProgram` call to `postFixup` 5. Set the `LOCALVER` environment variable to `nix`, so that the `hare version` command outputs `dev-nix`[1] 6. Set `meta` attribute `mainProgram` 7. Make the package accessible through `all-packages.nix` instead of `aliases.nix` 8. Move package path from `pkgs/development/compilers/hare/hare` to `pkgs/development/compilers/hare`, since the scope is now made at `pkgs/top-level/hare-packages.nix` harec: 1. Remove `hardeningDisable = [ "fortify" ];`, since both harec and hare compile normally with it enabled 2. Enable parallel building 3. Set `meta` attribute `mainProgram` 4. Make the package accessible through `all-packages.nix` instead of `aliases.nix` 5. Move package path from `pkgs/development/compilers/hare/harec` to `pkgs/development/compilers/harec`, since the scope is now made at `pkgs/top-level/hare-packages.nix` harePackages: 1. Move hare packages scope from `pkgs/development/compilers/hare/default.nix` to `pkgs/top-level/hare-packages.nix` 2. Remove `hare` and `harec` from `aliases.nix`, moving them to `all-packages.nix` 3. Change the `callPackage` argument in `all-packages.nix` from `../development/compilers/hare` to `./hare-packages.nix` [1]: https://git.sr.ht/~sircmpwn/hare/tree/1048620a7a25134db370bf24736efff1ffcb2483/item/scripts/version#L2 Co-authored-by: starzation <nixpkgs@starzation.net>
2023-11-08 00:25:05 +00:00
setupHook = ./setup-hook.sh;
hare: unstable-2023-04-23 -> unstable-2023-10-22; harec: unstable-2023-04-23 -> unstable-2023-10-23 And also the following refactoring: hare: 1. Replace `NIX_BUILD_TOP` usage with `mktemp` 2. Enable parallel building 3. Get rid of `config-template.mk`, by using `makeFlagsArray` instead 4. Move `wrapProgram` call to `postFixup` 5. Set the `LOCALVER` environment variable to `nix`, so that the `hare version` command outputs `dev-nix`[1] 6. Set `meta` attribute `mainProgram` 7. Make the package accessible through `all-packages.nix` instead of `aliases.nix` 8. Move package path from `pkgs/development/compilers/hare/hare` to `pkgs/development/compilers/hare`, since the scope is now made at `pkgs/top-level/hare-packages.nix` harec: 1. Remove `hardeningDisable = [ "fortify" ];`, since both harec and hare compile normally with it enabled 2. Enable parallel building 3. Set `meta` attribute `mainProgram` 4. Make the package accessible through `all-packages.nix` instead of `aliases.nix` 5. Move package path from `pkgs/development/compilers/hare/harec` to `pkgs/development/compilers/harec`, since the scope is now made at `pkgs/top-level/hare-packages.nix` harePackages: 1. Move hare packages scope from `pkgs/development/compilers/hare/default.nix` to `pkgs/top-level/hare-packages.nix` 2. Remove `hare` and `harec` from `aliases.nix`, moving them to `all-packages.nix` 3. Change the `callPackage` argument in `all-packages.nix` from `../development/compilers/hare` to `./hare-packages.nix` [1]: https://git.sr.ht/~sircmpwn/hare/tree/1048620a7a25134db370bf24736efff1ffcb2483/item/scripts/version#L2 Co-authored-by: starzation <nixpkgs@starzation.net>
2023-11-08 00:25:05 +00:00
passthru = {
updateScript = gitUpdater { };
tests = lib.optionalAttrs enableCrossCompilation {
crossCompilation = callPackage ./cross-compilation-tests.nix {
hare = finalAttrs.finalPackage;
};
};
};
hare: unstable-2023-04-23 -> unstable-2023-10-22; harec: unstable-2023-04-23 -> unstable-2023-10-23 And also the following refactoring: hare: 1. Replace `NIX_BUILD_TOP` usage with `mktemp` 2. Enable parallel building 3. Get rid of `config-template.mk`, by using `makeFlagsArray` instead 4. Move `wrapProgram` call to `postFixup` 5. Set the `LOCALVER` environment variable to `nix`, so that the `hare version` command outputs `dev-nix`[1] 6. Set `meta` attribute `mainProgram` 7. Make the package accessible through `all-packages.nix` instead of `aliases.nix` 8. Move package path from `pkgs/development/compilers/hare/hare` to `pkgs/development/compilers/hare`, since the scope is now made at `pkgs/top-level/hare-packages.nix` harec: 1. Remove `hardeningDisable = [ "fortify" ];`, since both harec and hare compile normally with it enabled 2. Enable parallel building 3. Set `meta` attribute `mainProgram` 4. Make the package accessible through `all-packages.nix` instead of `aliases.nix` 5. Move package path from `pkgs/development/compilers/hare/harec` to `pkgs/development/compilers/harec`, since the scope is now made at `pkgs/top-level/hare-packages.nix` harePackages: 1. Move hare packages scope from `pkgs/development/compilers/hare/default.nix` to `pkgs/top-level/hare-packages.nix` 2. Remove `hare` and `harec` from `aliases.nix`, moving them to `all-packages.nix` 3. Change the `callPackage` argument in `all-packages.nix` from `../development/compilers/hare` to `./hare-packages.nix` [1]: https://git.sr.ht/~sircmpwn/hare/tree/1048620a7a25134db370bf24736efff1ffcb2483/item/scripts/version#L2 Co-authored-by: starzation <nixpkgs@starzation.net>
2023-11-08 00:25:05 +00:00
meta = {
homepage = "https://harelang.org/";
description = "Systems programming language designed to be simple, stable, and robust";
hare: unstable-2023-04-23 -> unstable-2023-10-22; harec: unstable-2023-04-23 -> unstable-2023-10-23 And also the following refactoring: hare: 1. Replace `NIX_BUILD_TOP` usage with `mktemp` 2. Enable parallel building 3. Get rid of `config-template.mk`, by using `makeFlagsArray` instead 4. Move `wrapProgram` call to `postFixup` 5. Set the `LOCALVER` environment variable to `nix`, so that the `hare version` command outputs `dev-nix`[1] 6. Set `meta` attribute `mainProgram` 7. Make the package accessible through `all-packages.nix` instead of `aliases.nix` 8. Move package path from `pkgs/development/compilers/hare/hare` to `pkgs/development/compilers/hare`, since the scope is now made at `pkgs/top-level/hare-packages.nix` harec: 1. Remove `hardeningDisable = [ "fortify" ];`, since both harec and hare compile normally with it enabled 2. Enable parallel building 3. Set `meta` attribute `mainProgram` 4. Make the package accessible through `all-packages.nix` instead of `aliases.nix` 5. Move package path from `pkgs/development/compilers/hare/harec` to `pkgs/development/compilers/harec`, since the scope is now made at `pkgs/top-level/hare-packages.nix` harePackages: 1. Move hare packages scope from `pkgs/development/compilers/hare/default.nix` to `pkgs/top-level/hare-packages.nix` 2. Remove `hare` and `harec` from `aliases.nix`, moving them to `all-packages.nix` 3. Change the `callPackage` argument in `all-packages.nix` from `../development/compilers/hare` to `./hare-packages.nix` [1]: https://git.sr.ht/~sircmpwn/hare/tree/1048620a7a25134db370bf24736efff1ffcb2483/item/scripts/version#L2 Co-authored-by: starzation <nixpkgs@starzation.net>
2023-11-08 00:25:05 +00:00
license = lib.licenses.gpl3Only;
maintainers = with lib.maintainers; [ onemoresuza ];
mainProgram = "hare";
inherit (harec.meta) platforms badPlatforms;
};
})