uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
93
pkgs/development/compilers/hare/hare.nix
Normal file
93
pkgs/development/compilers/hare/hare.nix
Normal file
|
|
@ -0,0 +1,93 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, fetchFromSourcehut
|
||||
, binutils-unwrapped
|
||||
, harec
|
||||
, makeWrapper
|
||||
, qbe
|
||||
, scdoc
|
||||
, substituteAll
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "hare";
|
||||
version = "0.pre+date=2022-04-27";
|
||||
|
||||
src = fetchFromSourcehut {
|
||||
name = pname + "-src";
|
||||
owner = "~sircmpwn";
|
||||
repo = pname;
|
||||
rev = "1bfb2e6dee850c675a8831b41420800d3c62c2a0";
|
||||
hash = "sha256-1b7U5u3PM3jmnH/OnY9O++GTPyVOdFkJ0fwJBoDZgSU=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
binutils-unwrapped
|
||||
harec
|
||||
makeWrapper
|
||||
qbe
|
||||
scdoc
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
binutils-unwrapped
|
||||
harec
|
||||
qbe
|
||||
];
|
||||
|
||||
strictDeps = true;
|
||||
|
||||
configurePhase =
|
||||
let
|
||||
# https://harelang.org/platforms/
|
||||
arch =
|
||||
if stdenv.isx86_64 then "x86_64"
|
||||
else if stdenv.isAarch64 then "aarch64"
|
||||
else if stdenv.isRiscV64 then "riscv64"
|
||||
else "unsupported";
|
||||
platform =
|
||||
if stdenv.isLinux then "linux"
|
||||
else if stdenv.isFreeBSD then "freebsd"
|
||||
else "unsupported";
|
||||
hareflags = "";
|
||||
config-file = substituteAll {
|
||||
src = ./config-template.mk;
|
||||
inherit arch platform hareflags;
|
||||
};
|
||||
in
|
||||
''
|
||||
runHook preConfigure
|
||||
|
||||
export HARECACHE="$NIX_BUILD_TOP/.harecache"
|
||||
cat ${config-file} > config.mk
|
||||
|
||||
runHook postConfigure
|
||||
'';
|
||||
|
||||
makeFlags = [
|
||||
"PREFIX=${placeholder "out"}"
|
||||
];
|
||||
|
||||
doCheck = true;
|
||||
|
||||
postInstall =
|
||||
let
|
||||
binPath = lib.makeBinPath [
|
||||
binutils-unwrapped
|
||||
harec
|
||||
qbe
|
||||
];
|
||||
in
|
||||
''
|
||||
wrapProgram $out/bin/hare --prefix PATH : ${binPath}
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "http://harelang.org/";
|
||||
description =
|
||||
"A systems programming language designed to be simple, stable, and robust";
|
||||
license = licenses.gpl3Only;
|
||||
maintainers = with maintainers; [ AndersonTorres ];
|
||||
inherit (harec.meta) platforms badPlatforms;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue