default.nix 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. /*
  2. This is a nix expression to build Synfig from source on any distro
  3. where nix is installed. This will install all the dependencies from
  4. the nixpkgs repo and build Synfig without interfering with the host
  5. distro.
  6. http://nixos.org/nix/
  7. To quickly install nix, you can run the following command:
  8. $ curl -L http://git.io/nix-install.sh | bash
  9. To initialise it:
  10. $ source ~/.nix-profile/etc/profile.d/nix.sh
  11. To build synfig, from the current directory:
  12. $ nix-build
  13. To run the newly compiled synfigstudio:
  14. $ ./result/bin/synfigstudio
  15. */
  16. let
  17. pkgs = import <nixpkgs> {};
  18. stdenv = pkgs.stdenv;
  19. ETL = stdenv.mkDerivation {
  20. name = "ETL-git";
  21. src = ../ETL;
  22. preConfigure = "autoreconf --install --force";
  23. buildInputs = with pkgs; [ autoconf automake ];
  24. };
  25. synfig = stdenv.mkDerivation {
  26. name = "synfig-git";
  27. src = ../synfig-core;
  28. buildInputs = with pkgs; [
  29. ETL autoconf automake boost cairo gettext glibmm libsigcxx
  30. libtool libxmlxx pango pkgconfig
  31. ];
  32. preConfigure = "./bootstrap.sh";
  33. configureFlags = with pkgs; [ "--with-boost-libdir=${boost}/lib" ];
  34. };
  35. in
  36. stdenv.mkDerivation rec {
  37. name = "synfig-studio-git";
  38. src = ../synfig-studio;
  39. buildInputs = with pkgs; [
  40. ETL autoconf automake boost cairo gettext glibmm gtk gtkmm
  41. imagemagick intltool intltool jackaudio libsigcxx libtool libxmlxx
  42. pkgconfig synfig which
  43. ];
  44. preConfigure = "./bootstrap.sh";
  45. }