Blame autobuild/default-nixpkgs.nix

8b1f9e
/*
8b1f9e
This is a nix expression to build Synfig from source on any distro
8b1f9e
where nix is installed. This will install all the dependencies from
8b1f9e
the nixpkgs repo and build Synfig without interfering with the host
8b1f9e
distro.
8b1f9e
8b1f9e
http://nixos.org/nix/
8b1f9e
8b1f9e
To quickly install nix, you can run the following command:
8b1f9e
8b1f9e
$ curl -L http://git.io/nix-install.sh | bash
8b1f9e
8b1f9e
To initialise it:
8b1f9e
8b1f9e
$ source ~/.nix-profile/etc/profile.d/nix.sh
8b1f9e
8b1f9e
To build synfig, from the current directory:
8b1f9e
8b1f9e
$ nix-build
8b1f9e
8b1f9e
To run the newly compiled synfigstudio:
8b1f9e
8b1f9e
$ ./result/bin/synfigstudio
8b1f9e
*/
8b1f9e
8b1f9e
with import <nixpkgs> {};</nixpkgs>
8b1f9e
8b1f9e
let
8b1f9e
  version = "git";
8b1f9e
8b1f9e
  ETL = stdenv.mkDerivation rec {
8b1f9e
    name = "ETL-${version}";
8b1f9e
8b1f9e
    src = ../ETL;
8b1f9e
8b1f9e
    nativeBuildInputs = [ autoreconfHook ];
8b1f9e
  };
8b1f9e
8b1f9e
  synfig = stdenv.mkDerivation rec {
8b1f9e
    name = "synfig-${version}";
8b1f9e
8b1f9e
    src = ../synfig-core;
8b1f9e
8b1f9e
    configureFlags = [
8b1f9e
      "--with-boost=${boost.dev}"
8b1f9e
      "--with-boost-libdir=${boost.out}/lib"
8b1f9e
    ];
8b1f9e
8b1f9e
    nativeBuildInputs = [ pkgconfig autoreconfHook gettext ];
8b1f9e
8b1f9e
    buildInputs = [
8b1f9e
      ETL boost cairo fftw glibmm intltool libjpeg libsigcxx libxmlxx
8b1f9e
      mlt imagemagick pango which
8b1f9e
    ];
BobSynfig d05fc1
8b1f9e
    preConfigure = "./bootstrap.sh";
8b1f9e
8b1f9e
  };
8b1f9e
in
8b1f9e
stdenv.mkDerivation rec {
8b1f9e
  name = "synfigstudio-${version}";
8b1f9e
8b1f9e
  src = ../synfig-studio;
8b1f9e
8b1f9e
  preConfigure = "./bootstrap.sh";
8b1f9e
8b1f9e
  nativeBuildInputs = [ pkgconfig autoreconfHook gettext ];
8b1f9e
  buildInputs = [
8b1f9e
    ETL boost cairo fftw glibmm gnome3.defaultIconTheme gtk3 gtkmm3
8b1f9e
    imagemagick intltool libjack2 libsigcxx libxmlxx makeWrapper mlt
32d01d
    synfig which
8b1f9e
  ];
8b1f9e
8b1f9e
  postInstall = ''
8b1f9e
    wrapProgram "$out/bin/synfigstudio" \
8b1f9e
      --prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS:$GSETTINGS_SCHEMAS_PATH" \
8b1f9e
      --prefix XCURSOR_PATH : "${gnome3.adwaita-icon-theme.out}/share/icons" \
8b1f9e
      --set XCURSOR_THEME "Adwaita"
8b1f9e
  '';
8b1f9e
8b1f9e
  enableParallelBuilding = true;
8b1f9e
8b1f9e
  meta = with stdenv.lib; {
8b1f9e
    description = "A 2D animation program";
8b1f9e
    homepage = http://www.synfig.org;
8b1f9e
    license = licenses.gpl2Plus;
8b1f9e
    maintainers = [ maintainers.goibhniu ];
8b1f9e
    platforms = platforms.linux;
8b1f9e
  };
8b1f9e
}