mirror of
https://github.com/roc-lang/roc.git
synced 2024-10-26 18:28:43 +03:00
Adds nix expression for debugir
This commit is contained in:
parent
192b1f3d6f
commit
000910fd38
27
nix/debugir.nix
Normal file
27
nix/debugir.nix
Normal file
@ -0,0 +1,27 @@
|
||||
{ pkgs ? import <nixpkgs> {}}:
|
||||
|
||||
pkgs.stdenv.mkDerivation {
|
||||
name = "debugir";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "vaivaswatha";
|
||||
repo = "debugir";
|
||||
rev = "ed454ba264f30d2a70264357a31d94db3dd676eb";
|
||||
sha256 = "08hrn66zn5pa8jk45msl9ipa8d1p7r9gmpknh41fyjr6c7qpmfrk";
|
||||
};
|
||||
buildInputs = with pkgs; [
|
||||
cmake
|
||||
libxml2
|
||||
llvmPackages_12.llvm.dev
|
||||
];
|
||||
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
|
||||
'';
|
||||
}
|
@ -32,6 +32,7 @@ let
|
||||
llvmPkgs = pkgs.llvmPackages_12;
|
||||
|
||||
zig = import ./nix/zig.nix { inherit pkgs; };
|
||||
debugir = import ./nix/debugir.nix { inherit pkgs; };
|
||||
|
||||
inputs = with pkgs; [
|
||||
# build libraries
|
||||
@ -60,6 +61,7 @@ let
|
||||
|
||||
# faster builds - see https://github.com/rtfeldman/roc/blob/trunk/BUILDING_FROM_SOURCE.md#use-lld-for-the-linker
|
||||
llvmPkgs.lld
|
||||
debugir
|
||||
|
||||
# meta-tools
|
||||
# note: niv manages its own nixpkgs so it doesn't need pkgs.callPackage. Do
|
||||
|
Loading…
Reference in New Issue
Block a user