diff options
Diffstat (limited to 'nixpkgs/pkgs/development/tools/flatpak-builder/default.nix')
-rw-r--r-- | nixpkgs/pkgs/development/tools/flatpak-builder/default.nix | 54 |
1 files changed, 26 insertions, 28 deletions
diff --git a/nixpkgs/pkgs/development/tools/flatpak-builder/default.nix b/nixpkgs/pkgs/development/tools/flatpak-builder/default.nix index c3c59f1b2ba8..5752925e1451 100644 --- a/nixpkgs/pkgs/development/tools/flatpak-builder/default.nix +++ b/nixpkgs/pkgs/development/tools/flatpak-builder/default.nix @@ -3,18 +3,18 @@ , substituteAll , nixosTests -, autoreconfHook -, docbook_xml_dtd_412 -, docbook_xml_dtd_42 -, docbook_xml_dtd_43 +, docbook_xml_dtd_45 , docbook_xsl , gettext , libxml2 , libxslt , pkg-config , xmlto +, meson +, ninja , acl +, appstream , breezy , binutils , bzip2 @@ -36,23 +36,24 @@ , libyaml , ostree , patch -, python2 , rpm , unzip +, attr }: let installed_testdir = "${placeholder "installedTests"}/libexec/installed-tests/flatpak-builder"; - installed_test_metadir = "${placeholder "installedTests"}/share/installed-tests/flatpak-builder"; -in stdenv.mkDerivation rec { +in stdenv.mkDerivation (finalAttrs: { pname = "flatpak-builder"; - version = "1.2.3"; + version = "1.4.2"; outputs = [ "out" "doc" "man" "installedTests" ]; + # fetchFromGitHub fetches an archive which does not contain the full source (https://github.com/flatpak/flatpak-builder/issues/558) src = fetchurl { - url = "https://github.com/flatpak/flatpak-builder/releases/download/${version}/${pname}-${version}.tar.xz"; - sha256 = "sha256-4leCWkf3o+ceMPsPgPLZrG5IAfdG9VLfrw5WTj7jUcg="; + # TODO: remove the '-fixed-libglnx' in the next release + url = "https://github.com/flatpak/flatpak-builder/releases/download/${finalAttrs.version}/flatpak-builder-${finalAttrs.version}-fixed-libglnx.tar.xz"; + hash = "sha256-wEG5dOA6LC082oig7+Hs9p+a30KhdY6sNB1VXnedBZY="; }; patches = [ @@ -76,19 +77,17 @@ in stdenv.mkDerivation rec { euelfcompress = "${elfutils}/bin/eu-elfcompress"; }) - # The test scripts in Flatpak repo were updated so we are basing - # this on our patch for Flatpak 0.99. (substituteAll { src = ./fix-test-paths.patch; inherit glibcLocales; - # FIXME use python3 for tests that rely on python2 - # inherit python2; }) + ./fix-test-prefix.patch ]; nativeBuildInputs = [ - autoreconfHook - docbook_xml_dtd_43 + meson + ninja + docbook_xml_dtd_45 docbook_xsl gettext libxml2 @@ -99,6 +98,7 @@ in stdenv.mkDerivation rec { buildInputs = [ acl + appstream bzip2 curl debugedit @@ -113,14 +113,9 @@ in stdenv.mkDerivation rec { ostree ]; - configureFlags = [ - "--enable-installed-tests" - "--with-system-debugedit" - ]; - - makeFlags = [ - "installed_testdir=${installed_testdir}" - "installed_test_metadir=${installed_test_metadir}" + mesonFlags = [ + "-Dinstalled_tests=true" + "-Dinstalled_test_prefix=${placeholder "installedTests"}" ]; # Some scripts used by tests need to use shebangs that are available in Flatpak runtimes. @@ -130,7 +125,7 @@ in stdenv.mkDerivation rec { # Installed tests postFixup = '' - for file in ${installed_testdir}/{test-builder.sh,test-builder-python.sh}; do + for file in ${installed_testdir}/{test-builder.sh,test-builder-python.sh,test-builder-deprecated.sh}; do patchShebangs $file done ''; @@ -139,8 +134,10 @@ in stdenv.mkDerivation rec { installedTestsDependencies = [ gnupg ostree - # FIXME python2 gnumake + attr + libxml2 + appstream ]; tests = { @@ -150,9 +147,10 @@ in stdenv.mkDerivation rec { meta = with lib; { description = "Tool to build flatpaks from source"; + mainProgram = "flatpak-builder"; homepage = "https://github.com/flatpak/flatpak-builder"; license = licenses.lgpl21Plus; - maintainers = with maintainers; [ ]; + maintainers = with maintainers; [ arthsmn ]; platforms = platforms.linux; }; -} +}) |