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

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

73 lines
1.6 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 01:25:05 +01:00
{ lib
, stdenv
, fetchFromSourcehut
, 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 01:25:05 +01:00
}:
let
platform = lib.toLower stdenv.hostPlatform.uname.system;
arch = stdenv.hostPlatform.uname.processor;
2024-03-01 16:40:06 +01:00
qbePlatform = {
x86_64 = "amd64_sysv";
aarch64 = "arm64";
riscv64 = "rv64";
}.${arch};
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 01:25:05 +01:00
in
stdenv.mkDerivation (finalAttrs: {
pname = "harec";
version = "0.24.0";
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 01:25:05 +01:00
src = fetchFromSourcehut {
owner = "~sircmpwn";
repo = "harec";
rev = finalAttrs.version;
hash = "sha256-NOfoCT/wKZ3CXYzXZq7plXcun+MXQicfzBOmetXN7Qs=";
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 01:25:05 +01:00
};
nativeBuildInputs = [
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 01:25:05 +01:00
];
buildInputs = [
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 01:25:05 +01:00
];
makeFlags = [
"PREFIX=${builtins.placeholder "out"}"
"ARCH=${arch}"
"VERSION=${finalAttrs.version}-nixpkgs"
2024-03-01 16:40:06 +01:00
"QBEFLAGS=-t${qbePlatform}"
"CC=${stdenv.cc.targetPrefix}cc"
"AS=${stdenv.cc.targetPrefix}as"
"LD=${stdenv.cc.targetPrefix}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 01:25:05 +01: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 01:25:05 +01:00
enableParallelBuilding = true;
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 01:25:05 +01:00
passthru = {
updateScript = 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 01:25:05 +01:00
};
meta = {
homepage = "https://harelang.org/";
description = "Bootstrapping Hare compiler written in C for POSIX systems";
license = lib.licenses.gpl3Only;
maintainers = with lib.maintainers; [ onemoresuza ];
mainProgram = "harec";
# The upstream developers do not like proprietary operating systems; see
# https://harelang.org/platforms/
# UPDATE: https://github.com/hshq/harelang provides a MacOS port
platforms = with lib.platforms;
lib.intersectLists (freebsd ++ openbsd ++ linux) (aarch64 ++ x86_64 ++ 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 01:25:05 +01:00
badPlatforms = lib.platforms.darwin;
};
})