Hi. This is my first attempt at building a derivation to install a package.
The Github repo that contains the source has a submodule but according to the error, it looks like it’s trying to use the same rev for both the base repo and its submodule.
So I’m pulling in a repo called bld
with the rev a8d2310f8493200d7d776bc542fa0233a6eb4d0f
and the error is as it’s trying to use that as the rev for its submodule rife2-core
.
Am I misusing fetchGit?
This is what I have so far:
{
pkgs ? import (fetchTarball {
url = "https://github.com/NixOS/nixpkgs/archive/4fe8d07066f6ea82cda2b0c9ae7aee59b2d241b3.tar.gz";
sha256 = "sha256:06jzngg5jm1f81sc4xfskvvgjy5bblz51xpl788mnps1wrkykfhp";
}) {}
}:
pkgs.stdenv.mkDerivation rec {
pname = "bld";
version = "1.9.1";
src = fetchGit {
url = "https://github.com/rife2/bld";
ref = "main";
rev = "accf27c4db3ba3c15eeb481469ef4cc740da498d";
submodules = true;
};
buildInputs = [
pkgs.openjdk
pkgs.git
];
configurePhase = ''
'';
installPhase = ''
ls -al
./bld compile
'';
}
Where the error is
error: Cannot find Git revision 'a8d2310f8493200d7d776bc542fa0233a6eb4d0f' in ref 'master' of repository 'https://github.com/rife2/bld/git@github.com:rife2/rife2-core.git'! Please make sure that the rev exists on the ref you've specified or add allRefs = true; to fetchGit.