Merge pull request #181731 from ken-matsui/fix-cpm2
cpm: download from GitHub releases instead of GitHub source code
This commit is contained in:
commit
a165c1536c
@ -1,28 +1,25 @@
|
||||
{ lib
|
||||
, stdenvNoCC
|
||||
, fetchFromGitHub
|
||||
, fetchurl
|
||||
}:
|
||||
|
||||
stdenvNoCC.mkDerivation rec {
|
||||
pname = "cpm";
|
||||
version = "0.35.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "cpm-cmake";
|
||||
repo = "CPM.cmake";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-Oon/5iwkUUASsUDvde69iEwLe8/CAzwYKYsyzH5K+V0=";
|
||||
src = fetchurl {
|
||||
url = "https://github.com/cpm-cmake/CPM.cmake/releases/download/v${version}/CPM.cmake";
|
||||
sha256 = "sha256-CMge+NpJRU+G+c+s0tb2EN8UG6E8FE90lIvcULggYXY=";
|
||||
};
|
||||
|
||||
dontUnpack = true;
|
||||
dontConfigure = true;
|
||||
|
||||
dontBuild = true;
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p ${placeholder "out"}/share/cpm/
|
||||
cp ./cmake/CPM.cmake ${placeholder "out"}/share/cpm/
|
||||
install -Dm644 $src $out/share/cpm/CPM.cmake
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
Loading…
Reference in New Issue
Block a user