feat: some nix shit

This commit is contained in:
2025-04-04 01:59:57 +00:00
parent 5ab0833d78
commit d800266fe0
5 changed files with 105 additions and 60 deletions

View File

@@ -0,0 +1,30 @@
{ stdenv, gcc, lib, hectic, bash }:
stdenv.mkDerivation {
pname = "watch";
version = "1.0";
src = ./.;
doCheck = true;
nativeBuildInputs = [ gcc gdb ];
buildPhase = ''
${bash}/bin/sh ./make.sh build
'';
checkPhase = ''
${bash}/bin/sh ./make.sh check
'';
installPhase = ''
mkdir -p $out/bin $out/lib $out/include
cp target/hmpl $out/bin/hmpl
cp target/libhmpl.a $out/lib/
cp hmpl.h $out/include/hmpl.h
'';
meta = {
description = "watch";
license = lib.licenses.mit;
};
}