mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-27 01:13:05 +00:00
76cd1d2211
I guess my time has come as well... With this commit, I'm not just dropping my maintainer entry, but I'm also resigning from my duties as a board observer and NixCon project lead. I also terminated my Summer of Nix contract today. I'll also stop hosting the local NixOS meetup. The only "project" I'll finish under the NixOS Foundation umbrella is Google Summer of Code because the mentees aren't even remotely responsible for why I'm leaving, and it would be unfair to leave them hanging. I'm grateful for all the things I was able to learn, for all the experiences I could gather, and for all the friends I made along the way. NixOS is what makes computers bearable for me, so I'll go and work on some fork (*something something* you always meet twice in life).
88 lines
2.0 KiB
Nix
88 lines
2.0 KiB
Nix
{ lib
|
|
, fetchFromGitHub
|
|
, buildGoModule
|
|
, fetchYarnDeps
|
|
, stdenv
|
|
, yarn
|
|
, nodejs
|
|
, nixosTests
|
|
, fixup-yarn-lock
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
pname = "alice-lg";
|
|
version = "6.1.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "alice-lg";
|
|
repo = "alice-lg";
|
|
rev = version;
|
|
hash = "sha256-BbwTLHDtpa8HCECIiy+UxyQiLf9iAD2GzE0azXk7QGU=";
|
|
};
|
|
|
|
vendorHash = "sha256-8N5E1CW5Z7HujwXRsZLv7y4uNOJkjj155kmX9PCjajQ=";
|
|
|
|
passthru.ui = stdenv.mkDerivation {
|
|
pname = "alice-lg-ui";
|
|
src = "${src}/ui";
|
|
inherit version;
|
|
|
|
yarnOfflineCache = fetchYarnDeps {
|
|
yarnLock = src + "/ui/yarn.lock";
|
|
hash = "sha256-PwByNIegKYTOT8Yg3nDMDFZiLRVkbX07z99YaDiBsIY=";
|
|
};
|
|
|
|
nativeBuildInputs = [ nodejs yarn fixup-yarn-lock ];
|
|
configurePhase = ''
|
|
runHook preConfigure
|
|
|
|
# Yarn and bundler wants a real home directory to write cache, config, etc to
|
|
export HOME=$NIX_BUILD_TOP/fake_home
|
|
|
|
# Make yarn install packages from our offline cache, not the registry
|
|
yarn config --offline set yarn-offline-mirror $yarnOfflineCache
|
|
|
|
# Fixup "resolved"-entries in yarn.lock to match our offline cache
|
|
fixup-yarn-lock yarn.lock
|
|
|
|
yarn install --offline --frozen-lockfile --ignore-scripts --no-progress --non-interactive
|
|
patchShebangs node_modules/
|
|
runHook postConfigure
|
|
'';
|
|
|
|
buildPhase = ''
|
|
runHook preBuild
|
|
|
|
./node_modules/.bin/react-scripts build
|
|
|
|
runHook postBuild
|
|
'';
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
|
|
mv build $out
|
|
|
|
runHook postInstall
|
|
'';
|
|
};
|
|
|
|
preBuild = ''
|
|
cp -R ${passthru.ui}/ ui/build/
|
|
'';
|
|
|
|
subPackages = [ "cmd/alice-lg" ];
|
|
doCheck = false;
|
|
|
|
passthru.tests = nixosTests.alice-lg;
|
|
|
|
meta = with lib; {
|
|
homepage = "https://github.com/alice-lg/alice-lg";
|
|
description = "Looking-glass for BGP sessions";
|
|
changelog = "https://github.com/alice-lg/alice-lg/blob/main/CHANGELOG.md";
|
|
license = licenses.bsd3;
|
|
maintainers = with maintainers; [ ];
|
|
mainProgram = "alice-lg";
|
|
};
|
|
}
|