Expression files and instructions for building with Nix

master
Emery Hemingway 2014-10-01 13:43:14 -04:00
parent 17013084fe
commit 990574ab58
4 changed files with 58 additions and 0 deletions

1
.gitignore vendored
View File

@ -62,3 +62,4 @@ gmon.out
.project
.cproject
.dirstamp
result

View File

@ -6,6 +6,7 @@ Table of Contents
1.3 Windows - Autotools (Linux cross-compile)
1.4 OS X - Autotools
1.5 OSX - XCode 4
1.6 Nix - Autotools
2 pioneer-thirdparty
2.1 Linux - Autotools
2.2 Windows - MSVC
@ -163,6 +164,23 @@ have installed above. Once the pioneer.app bundle is complete you can move it
around where you like (/Applications is a nice place for it).
1.6 Nix - Autotools
-------------------
1. Install the development environment using the included expressions.
nix-env -i -f nix/env.nix # build and install the environment
load-env-pioneer # load the environment
2. Run ./bootstrap to generate your 'configure' file
3. Run ./configure to configure the build.
4. Run make to build everything
Executing ./pioneer requires the development environment to be loaded,
executing ./src/pioneer does not.
2 pioneer-thirdparty
====================

27
nix/assimp.nix Normal file
View File

@ -0,0 +1,27 @@
{ stdenv, fetchurl, unzip, cmake, boost }:
let
major = "3";
minor = "1";
revision = "1";
version = "${major}.${minor}.${revision}";
in
stdenv.mkDerivation {
name = "assimp-${version}";
src = fetchurl {
url = "mirror://sourceforge/project/assimp/assimp-${major}.${minor}/assimp-${version}_no_test_models.zip";
sha256 = "17nyzsqzqpafamhi779f1bkh5mfgj8rpas034x3v9a0hdy3jg66s";
};
buildInputs = [ unzip cmake boost ];
meta = with stdenv.lib; {
description = "Open Asset Import Library is a library to import various 3D model formats";
homepage = http://assimp.sourceforge.net/;
license = licenses.bsd3;
maintainers = with maintainers; [ emery ];
platfroms = platforms.linux;
inherit version;
};
}

12
nix/env.nix Normal file
View File

@ -0,0 +1,12 @@
{ pkgs ? import <nixpkgs> { } }:
let
assimp = pkgs.assimp or pkgs.callPackage ./assimp.nix { };
in
pkgs.myEnvFun {
name = "pioneer";
buildInputs = with pkgs; [
autoconf automake pkgconfig
libsigcxx SDL2 SDL2_image freetype libvorbis libpng
assimp mesa
];
}