27 lines
566 B
Nix
27 lines
566 B
Nix
|
{ stdenv
|
||
|
, fetchgit
|
||
|
, ...}:
|
||
|
|
||
|
stdenv.mkDerivation rec {
|
||
|
pname = "keytracker-frontend";
|
||
|
version = "0.0.1";
|
||
|
|
||
|
src = (fetchgit {
|
||
|
url = "https://gitlab.infra4future.de/octycs/keytracker";
|
||
|
rev = "0a124c3e7bc5c0e840d45399ad5e69485bb3e49c";
|
||
|
sha256 = "1l3djg3qfisrvv9shi2p44h026n58pimwbvr2idjnaill688s1qf";
|
||
|
}).outPath + "/frontend";
|
||
|
|
||
|
apiUrl = "https://localhost:5000";
|
||
|
|
||
|
buildPhase = ''
|
||
|
substituteInPlace assets/main.js --replace "http://localhost:5000" $apiUrl
|
||
|
rm Readme.md
|
||
|
'';
|
||
|
|
||
|
installPhase = ''
|
||
|
mkdir -p $out
|
||
|
cp -r * $out
|
||
|
'';
|
||
|
}
|