haccfiles/pkgs/keytracker/frontend.nix

27 lines
573 B
Nix
Raw Normal View History

{ stdenv
, fetchgit
, ...}:
stdenv.mkDerivation rec {
pname = "keytracker-frontend";
version = "0.0.1";
src = (fetchgit {
url = "https://gitlab.infra4future.de/octycs/keytracker";
rev = "2e83366913732029e8a5913f121df969172244ed";
sha256 = "sha256-ty8m/ITR2gmui3dIJX04FkGT/9SGuirrALyWaNaNwhE=";
}).outPath + "/frontend";
apiUrl = "http://chaski.stuebinm.eu:3030";
buildPhase = ''
substituteInPlace assets/main.js --replace "http://localhost:5000" $apiUrl
rm Readme.md
'';
installPhase = ''
mkdir -p $out
cp -r * $out
'';
}