18 src = fetchFromGitHub {
22 hash = "sha256-BbwTLHDtpa8HCECIiy+UxyQiLf9iAD2GzE0azXk7QGU=";
25 vendorHash = "sha256-8N5E1CW5Z7HujwXRsZLv7y4uNOJkjj155kmX9PCjajQ=";
27 passthru.ui = stdenv.mkDerivation {
28 pname = "alice-lg-ui";
32 yarnOfflineCache = fetchYarnDeps {
33 yarnLock = src + "/ui/yarn.lock";
34 hash = "sha256-PwByNIegKYTOT8Yg3nDMDFZiLRVkbX07z99YaDiBsIY=";
46 # Yarn and bundler wants a real home directory to write cache, config, etc to
47 export HOME=$NIX_BUILD_TOP/fake_home
49 # Make yarn install packages from our offline cache, not the registry
50 yarn config --offline set yarn-offline-mirror $yarnOfflineCache
52 # Fixup "resolved"-entries in yarn.lock to match our offline cache
53 fixup-yarn-lock yarn.lock
55 yarn install --offline --frozen-lockfile --ignore-scripts --no-progress --non-interactive
56 patchShebangs node_modules/
63 ./node_modules/.bin/react-scripts build
78 cp -R ${passthru.ui}/ ui/build/
81 subPackages = [ "cmd/alice-lg" ];
85 tests = nixosTests.alice-lg;
86 updateScript = gitUpdater { };
90 homepage = "https://github.com/alice-lg/alice-lg";
91 description = "Looking-glass for BGP sessions";
92 changelog = "https://github.com/alice-lg/alice-lg/blob/main/CHANGELOG.md";
93 license = lib.licenses.bsd3;
94 maintainers = with lib.maintainers; [ stv0g ];
95 mainProgram = "alice-lg";