From 5302d519f98fdb78d387165b278a127158fe342a Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Thu, 21 Nov 2024 01:05:40 +0100 Subject: [PATCH] ubports-pdk: init at 0-unstable-2024-08-28 --- pkgs/by-name/ub/ubports-pdk/package.nix | 69 +++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 pkgs/by-name/ub/ubports-pdk/package.nix diff --git a/pkgs/by-name/ub/ubports-pdk/package.nix b/pkgs/by-name/ub/ubports-pdk/package.nix new file mode 100644 index 000000000000..8d3f124a6804 --- /dev/null +++ b/pkgs/by-name/ub/ubports-pdk/package.nix @@ -0,0 +1,69 @@ +{ + stdenvNoCC, + lib, + fetchFromGitHub, + unstableGitUpdater, + bash, + coreutils, + dosfstools, + makeWrapper, + mtools, + wget, + which, + xz, +}: + +stdenvNoCC.mkDerivation (finalAttrs: { + pname = "ubports-pdk"; + version = "0-unstable-2024-08-28"; + + src = fetchFromGitHub { + owner = "ubports"; + repo = "ubports-pdk"; + rev = "ce16915f1ec2aa54bc0f010db7603fbb0deebf4b"; + hash = "sha256-jxlia3RgH3DAUO5OK3jB4IH0vUoG2XZKmODq4VhwJFE="; + }; + + strictDeps = true; + + nativeBuildInputs = [ makeWrapper ]; + + buildInputs = [ + bash + coreutils + dosfstools + mtools + wget + which + xz + ]; + + dontBuild = true; + + installPhase = '' + runHook preInstall + + mkdir -p $out/bin + + install -Dm755 ubuntu-touch-pdk $out/share/ubuntu-touch-pdk/ubuntu-touch-pdk + cp -R scripts $out/share/ubuntu-touch-pdk/ + + makeWrapper $out/share/ubuntu-touch-pdk/ubuntu-touch-pdk $out/bin/ubuntu-touch-pdk \ + --prefix PATH : ${lib.makeBinPath finalAttrs.finalPackage.buildInputs} + + runHook postInstall + ''; + + passthru.updateScript = unstableGitUpdater { }; + + meta = { + description = "Platform Development Kit for Ubuntu Touch"; + homepage = "https://github.com/ubports/ubports-pdk"; + license = lib.licenses.gpl3Only; + mainProgram = "ubuntu-touch-pdk"; + maintainers = with lib.maintainers; [ OPNA2608 ]; + platforms = lib.platforms.unix; + # setup wants to use brew to install extra prerequisites + broken = stdenvNoCC.hostPlatform.isDarwin; + }; +})