16 src = fetchFromGitHub {
20 hash = "sha256-BbwTLHDtpa8HCECIiy+UxyQiLf9iAD2GzE0azXk7QGU=";
23 vendorHash = "sha256-8N5E1CW5Z7HujwXRsZLv7y4uNOJkjj155kmX9PCjajQ=";
25 passthru.ui = stdenv.mkDerivation {
26 pname = "alice-lg-ui";
30 yarnOfflineCache = fetchYarnDeps {
31 yarnLock = src + "/ui/yarn.lock";
32 hash = "sha256-PwByNIegKYTOT8Yg3nDMDFZiLRVkbX07z99YaDiBsIY=";
35 nativeBuildInputs = [ nodejs yarn fixup-yarn-lock ];
39 # Yarn and bundler wants a real home directory to write cache, config, etc to
40 export HOME=$NIX_BUILD_TOP/fake_home
42 # Make yarn install packages from our offline cache, not the registry
43 yarn config --offline set yarn-offline-mirror $yarnOfflineCache
45 # Fixup "resolved"-entries in yarn.lock to match our offline cache
46 fixup-yarn-lock yarn.lock
48 yarn install --offline --frozen-lockfile --ignore-scripts --no-progress --non-interactive
49 patchShebangs node_modules/
56 ./node_modules/.bin/react-scripts build
71 cp -R ${passthru.ui}/ ui/build/
74 subPackages = [ "cmd/alice-lg" ];
77 passthru.tests = nixosTests.alice-lg;
80 homepage = "https://github.com/alice-lg/alice-lg";
81 description = "A looking-glass for BGP sessions";
82 changelog = "https://github.com/alice-lg/alice-lg/blob/main/CHANGELOG.md";
83 license = licenses.bsd3;
84 maintainers = with maintainers; [ janik ];
85 mainProgram = "alice-lg";