roc/nix/debugir.nix

24 lines
614 B
Nix
Raw Normal View History

2021-08-31 00:50:39 +03:00
{ pkgs ? import <nixpkgs> { } }:
2021-08-09 04:56:32 +03:00
pkgs.stdenv.mkDerivation {
name = "debugir";
src = pkgs.fetchFromGitHub {
2021-08-31 13:36:48 +03:00
owner = "vaivaswatha";
2021-08-09 04:56:32 +03:00
repo = "debugir";
2021-08-31 13:36:48 +03:00
rev = "db871e6cee7f653e284b226e2567a2574635247c";
sha256 = "0rgh9gawf92mjya1plxlgi9azkwca3gq8qa5hri18k4b7sbjm6lx";
2021-08-09 04:56:32 +03:00
};
2021-08-31 00:50:39 +03:00
buildInputs = with pkgs; [ cmake libxml2 llvmPackages_12.llvm.dev ];
2021-08-09 04:56:32 +03:00
buildPhase = ''
mkdir build
cd build
cmake -DLLVM_DIR=${pkgs.llvmPackages_12.llvm.dev} -DCMAKE_BUILD_TYPE=Release ../
cmake --build ../
cp ../debugir .
'';
installPhase = ''
mkdir -p $out/bin
cp debugir $out/bin
'';
}