mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-20 02:55:39 +00:00
Merge pull request #316290 from Wulfsta/mailsail-src
mainsail: refactor to build from source
This commit is contained in:
commit
11f162e8ec
@ -1,26 +1,34 @@
|
||||
{ lib
|
||||
, stdenvNoCC
|
||||
, fetchzip
|
||||
, buildNpmPackage
|
||||
, fetchFromGitHub
|
||||
}:
|
||||
|
||||
stdenvNoCC.mkDerivation rec {
|
||||
buildNpmPackage rec {
|
||||
pname = "mainsail";
|
||||
version = "2.11.2";
|
||||
|
||||
src = fetchzip {
|
||||
url = "https://github.com/mainsail-crew/mainsail/releases/download/v${version}/mainsail.zip";
|
||||
hash = "sha256-RdBgGE/EUzb1/6PjQ34UjXjxt686s9May7npFtRocXE=";
|
||||
stripRoot = false;
|
||||
src = fetchFromGitHub {
|
||||
owner = "mainsail-crew";
|
||||
repo = "mainsail";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-N0tm36YMRRrkyuIwzcYbDo1DHesAnJ2s2g0KCms3h5I=";
|
||||
};
|
||||
|
||||
dontConfigure = true;
|
||||
dontBuild = true;
|
||||
npmDepsHash = "sha256-z6Fo0XAds/F0Ig+nUE3O16gmH0EVcpML3K8cdKhkJzg=";
|
||||
|
||||
# Prevent Cypress binary download.
|
||||
CYPRESS_INSTALL_BINARY = 0;
|
||||
|
||||
preConfigure = ''
|
||||
# Make the build.zip target do nothing, since we will just copy these files later.
|
||||
sed -e 's/"build.zip":.*,$/"build.zip": "",/g' -i package.json
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out/share/mainsail
|
||||
cp -r ./* $out/share/mainsail
|
||||
mkdir -p $out/share
|
||||
cp -r ./dist $out/share/mainsail
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
@ -31,6 +39,6 @@ stdenvNoCC.mkDerivation rec {
|
||||
changelog = "https://github.com/mainsail-crew/mainsail/releases/tag/v${version}";
|
||||
license = licenses.gpl3Plus;
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ shhht lovesegfault ];
|
||||
maintainers = with maintainers; [ shhht lovesegfault wulfsta ];
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user