Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added default.nix for build/dev environment on NixOS #1474

Merged
merged 1 commit into from
Apr 22, 2017

Conversation

Hodapp87
Copy link
Contributor

This should hopefully make it easy to create a build/development environment on NixOS right from a checked-out darktable repo (if a newer version than available in the nixpkgs repos is desired). I'd like to add some short instructions to https://redmine.darktable.org/projects/darktable/wiki/Building_darktable_20 for this, probably some variant of the below.

Building is a matter of:

git submodule init
git submodule update
nix-shell
./build.sh --prefix ./install --build-dir ../darktable-build

Or, nix-build will build the packaged NixOS binaries, and nix-env -f . -i ".*" will build and install.

@houz
Copy link
Member

houz commented Apr 21, 2017

I'd prefer that file to be in packaging/nixos/ so it follows the other linux distros.

@Hodapp87
Copy link
Contributor Author

I can put it there, but is there a better place, given that this has nothing to do with packaging darktable on NixOS (nixpkgs already handles that), but rather is about creating the dev environment there?


src = pkgs.lib.cleanSource ./.;

buildInputs = with pkgs; with xorg; with gnome2;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are you sure about these deps? e.g. libgnome_keyring is dead. libglade, SDL are not deps.
and libpthreadstubs looks strange, is it not handled by std library?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I took these from the Nixpkgs derivation, which I didn't write in the first place. However, it seems you're right, as I was able to remove all the ones you said and the build appeared fine to me.

Building should be a matter of:
git submodule init
git submodule update
nix-shell packaging/nix
./build.sh --prefix ./install --build-dir ../darktable-build

then following the final command from build.sh,
cmake --build "../darktable-build" --target install -- -j4
or whatever.
@LebedevRI LebedevRI merged commit 9ef2e36 into darktable-org:master Apr 22, 2017
@Hodapp87 Hodapp87 deleted the nixos_dev branch April 22, 2017 13:46
Hodapp87 added a commit to Hodapp87/nixpkgs that referenced this pull request May 1, 2017
Based on what LebedevRI told me on IRC and in
darktable-org/darktable#1474
@LebedevRI LebedevRI added this to the 2.4 milestone Nov 18, 2017
jtojnar pushed a commit to Hodapp87/nixpkgs that referenced this pull request Feb 9, 2018
Based on what LebedevRI told me on IRC and in
darktable-org/darktable#1474
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants