depot/third_party/nixpkgs/pkgs/development/compilers/myrddin/default.nix
Default email 841d9c7fc1 Project import generated by Copybara.
GitOrigin-RevId: 3a8d7958a610cd3fec3a6f424480f91a1b259185
2021-06-29 00:13:55 +01:00

57 lines
991 B
Nix

{ stdenv
, lib
, fetchFromGitHub
, pkg-config
, bison
, binutils
, binutils-unwrapped
, makeWrapper
}:
stdenv.mkDerivation rec {
pname = "myrddin";
version = "0.3.1";
src = fetchFromGitHub {
repo = "mc";
owner = "oridb";
rev = "r${version}";
sha256 = "7ImjiG/rIKGPHq3Vh/mftY7pqw/vfOxD3LJeT87HmCk=";
};
nativeBuildInputs = [
bison
pkg-config
makeWrapper
];
postPatch = ''
substituteInPlace mk/c.mk \
--replace "-Werror" ""
'';
buildPhase = ''
make bootstrap
make
'';
postInstall = ''
for b in $out/bin/*; do
wrapProgram $b --prefix PATH : $out/bin:${lib.makeBinPath [ binutils ]}
done
'';
checkPhase = ''
make check
'';
doCheck = true;
meta = with lib; {
description = "Systems language that is both powerful and fun to use";
homepage = "https://myrlang.org/";
license = licenses.mit;
maintainers = with maintainers; [ luc65r ];
platforms = platforms.all;
};
}