commit
5150647c86
1 changed files with 15 additions and 5 deletions
|
@ -1,31 +1,41 @@
|
||||||
{ lib
|
{ lib
|
||||||
, stdenv
|
, stdenv
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
|
, fetchpatch
|
||||||
, gprbuild
|
, gprbuild
|
||||||
, gnat
|
, gnat
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation (finalAttrs: {
|
stdenv.mkDerivation (finalAttrs: {
|
||||||
pname = "alire";
|
pname = "alire";
|
||||||
version = "1.2.2";
|
version = "2.0.0";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "alire-project";
|
owner = "alire-project";
|
||||||
repo = "alire";
|
repo = "alire";
|
||||||
rev = "v${finalAttrs.version}";
|
rev = "v${finalAttrs.version}";
|
||||||
hash = "sha256-rwNiSXOIIQR1I8wwp1ROVOfEChT6SCa5c6XnTRqekDc=";
|
hash = "sha256-WF7spXwQR04zIGWazUrbCdeLYOzsk8C6G+cfSS6bwdE=";
|
||||||
|
|
||||||
fetchSubmodules = true;
|
fetchSubmodules = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ gprbuild gnat ];
|
nativeBuildInputs = [ gprbuild gnat ];
|
||||||
|
|
||||||
# on HEAD (roughly 2c4e5a3), alire provides a dev/build.sh script. for now,
|
patches = [(fetchpatch {
|
||||||
# just use gprbuild.
|
name = "control-build-jobs.patch";
|
||||||
|
url = "https://github.com/alire-project/alire/pull/1651.patch";
|
||||||
|
hash = "sha256-CBQm8Doydze/KouLWuYm+WYlvnDguR/OuX8A4y4F6fo=";
|
||||||
|
})];
|
||||||
|
|
||||||
|
postPatch = ''
|
||||||
|
patchShebangs ./dev/build.sh
|
||||||
|
'';
|
||||||
|
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
runHook preBuild
|
runHook preBuild
|
||||||
|
|
||||||
gprbuild -j$NIX_BUILD_CORES -P alr_env
|
export ALIRE_BUILD_JOBS="$NIX_BUILD_CORES"
|
||||||
|
./dev/build.sh
|
||||||
|
|
||||||
runHook postBuild
|
runHook postBuild
|
||||||
'';
|
'';
|
||||||
|
|
Loading…
Reference in a new issue