initial nix support

This commit is contained in:
Wolfgang Thaller 2020-10-04 15:35:11 +02:00
parent 60f7efb5d4
commit d2284679f9
3 changed files with 31 additions and 1 deletions

2
.gitignore vendored
View File

@ -5,4 +5,4 @@ CMakeLists.txt.user
InterfacesAndLibraries
.DS_Store
.vscode
result

27
default.nix Normal file
View File

@ -0,0 +1,27 @@
{ system ? builtins.currentSystem, pkgs ? import <nixpkgs> { inherit system; }
, ... }:
pkgs.callPackage ({
stdenv, cmake, ninja, bison, flex,ruby, boost, gmp, mpfr, libmpc, zlib,
lib, bash }:
stdenv.mkDerivation {
name = "retro68";
nativeBuildInputs = [ cmake bison ruby flex ];
buildInputs = [
boost
gmp
mpfr
libmpc
zlib
bash
];
src = if lib.inNixShell then null else pkgs.nix-gitignore.gitignoreSource [ ] ./.;
builder = ./nix/builder.sh;
hardeningDisable = ["all"];
}
) { }

3
nix/builder.sh Normal file
View File

@ -0,0 +1,3 @@
source $stdenv/setup
bash $src/build-toolchain.bash --prefix=$out