diff options
author | github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | 2021-04-18 18:10:37 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-18 18:10:37 +0000 |
commit | b57b2b362ce04281b1ce3d7236c4972966405ffe (patch) | |
tree | 0c3178603ad3383413eb23a9e93a38a80987ac2e /pkgs/applications/video | |
parent | 9e804db1da8eec906501a69833a22f80fdc2c291 (diff) | |
parent | 528b3af3065d79645021f334cd7ca7a2476c5e50 (diff) | |
download | nixpkgs-b57b2b362ce04281b1ce3d7236c4972966405ffe.tar nixpkgs-b57b2b362ce04281b1ce3d7236c4972966405ffe.tar.gz nixpkgs-b57b2b362ce04281b1ce3d7236c4972966405ffe.tar.bz2 nixpkgs-b57b2b362ce04281b1ce3d7236c4972966405ffe.tar.lz nixpkgs-b57b2b362ce04281b1ce3d7236c4972966405ffe.tar.xz nixpkgs-b57b2b362ce04281b1ce3d7236c4972966405ffe.tar.zst nixpkgs-b57b2b362ce04281b1ce3d7236c4972966405ffe.zip |
Merge master into staging-next
Diffstat (limited to 'pkgs/applications/video')
-rw-r--r-- | pkgs/applications/video/losslesscut-bin/appimage.nix | 45 | ||||
-rw-r--r-- | pkgs/applications/video/losslesscut-bin/default.nix | 24 | ||||
-rw-r--r-- | pkgs/applications/video/losslesscut-bin/dmg.nix | 31 | ||||
-rw-r--r-- | pkgs/applications/video/losslesscut-bin/windows.nix | 45 | ||||
-rw-r--r-- | pkgs/applications/video/screenkey/default.nix | 13 |
5 files changed, 148 insertions, 10 deletions
diff --git a/pkgs/applications/video/losslesscut-bin/appimage.nix b/pkgs/applications/video/losslesscut-bin/appimage.nix new file mode 100644 index 00000000000..d1f60c3dd2c --- /dev/null +++ b/pkgs/applications/video/losslesscut-bin/appimage.nix @@ -0,0 +1,45 @@ +{ appimageTools, lib, fetchurl, gtk3, gsettings-desktop-schemas, version }: + +let + pname = "losslesscut"; + nameRepo = "lossless-cut"; + nameCamel = "LosslessCut"; + name = "${pname}-${version}"; + nameSource = "${nameCamel}-linux.AppImage"; + nameExecutable = "losslesscut"; + owner = "mifi"; + src = fetchurl { + url = "https://github.com/${owner}/${nameRepo}/releases/download/v${version}/${nameSource}"; + name = nameSource; + sha256 = "0aqz5ijl5japfzzbcdcd2mmihkb8b2fc2hs9kkm3211yb37c5ygv"; + }; + extracted = appimageTools.extractType2 { + inherit name src; + }; +in appimageTools.wrapType2 { + inherit name src; + + profile = '' + export LC_ALL=C.UTF-8 + export XDG_DATA_DIRS=${gsettings-desktop-schemas}/share/gsettings-schemas/${gsettings-desktop-schemas.name}:${gtk3}/share/gsettings-schemas/${gtk3.name}:$XDG_DATA_DIRS + ''; + + extraPkgs = ps: appimageTools.defaultFhsEnvArgs.multiPkgs ps; + + extraInstallCommands = '' + mv $out/bin/{${name},${nameExecutable}} + ( + mkdir -p $out/share + cd ${extracted}/usr + find share -mindepth 1 -type d -exec mkdir -p $out/{} \; + find share -mindepth 1 -type f,l -exec ln -s $PWD/{} $out/{} \; + ) + ln -s ${extracted}/${nameExecutable}.png $out/share/icons/${nameExecutable}.png + mkdir $out/share/applications + cp ${extracted}/${nameExecutable}.desktop $out/share/applications + substituteInPlace $out/share/applications/${nameExecutable}.desktop \ + --replace AppRun ${nameExecutable} + ''; + + meta.platforms = with lib.platforms; [ "x86_64-linux" ]; +} diff --git a/pkgs/applications/video/losslesscut-bin/default.nix b/pkgs/applications/video/losslesscut-bin/default.nix new file mode 100644 index 00000000000..01f9c158062 --- /dev/null +++ b/pkgs/applications/video/losslesscut-bin/default.nix @@ -0,0 +1,24 @@ +{ callPackage, stdenvNoCC, lib }: +let + version = "3.33.1"; + appimage = callPackage ./appimage.nix { inherit version; }; + dmg = callPackage ./dmg.nix { inherit version; }; + windows = callPackage ./windows.nix { inherit version; }; +in ( + if stdenvNoCC.isDarwin then dmg + else if stdenvNoCC.isCygwin then windows + else appimage +).overrideAttrs +(oldAttrs: { + meta = with lib; { + description = "The swiss army knife of lossless video/audio editing"; + homepage = "https://mifi.no/losslesscut/"; + license = licenses.mit; + maintainers = with maintainers; [ ShamrockLee ]; + } // oldAttrs.meta // { + platforms = + appimage.meta.platforms + ++ dmg.meta.platforms + ++ windows.meta.platforms; + }; +}) diff --git a/pkgs/applications/video/losslesscut-bin/dmg.nix b/pkgs/applications/video/losslesscut-bin/dmg.nix new file mode 100644 index 00000000000..3d0bad19757 --- /dev/null +++ b/pkgs/applications/video/losslesscut-bin/dmg.nix @@ -0,0 +1,31 @@ +{ stdenvNoCC, lib, fetchurl, undmg, version }: + +let + pname = "losslesscut"; + nameRepo = "lossless-cut"; + nameCamel = "LosslessCut"; + nameSource = "${nameCamel}-mac.dmg"; + nameApp = nameCamel + ".app"; + owner = "mifi"; + src = fetchurl { + url = "https://github.com/${owner}/${nameRepo}/releases/download/v${version}/${nameSource}"; + name = nameSource; + sha256 = "0xa1avbwar7x7kv5yn2ldca4vj3nwaz0dhjm3bcdy59q914xn3dj"; + }; +in stdenvNoCC.mkDerivation { + inherit pname version src; + + nativeBuildInputs = [ undmg ]; + + unpackPhase = '' + undmg ${src} + ''; + sourceRoot = nameApp; + + installPhase = '' + mkdir -p $out/Applications/${nameApp} + cp -R . $out/Applications/${nameApp} + ''; + + meta.platforms = lib.platforms.darwin; +} diff --git a/pkgs/applications/video/losslesscut-bin/windows.nix b/pkgs/applications/video/losslesscut-bin/windows.nix new file mode 100644 index 00000000000..fe5df9d6c90 --- /dev/null +++ b/pkgs/applications/video/losslesscut-bin/windows.nix @@ -0,0 +1,45 @@ +{ stdenvNoCC +, lib +, fetchurl +, unzip +, version +, useMklink ? false +, customSymlinkCommand ? null +}: +let + pname = "losslesscut"; + nameRepo = "lossless-cut"; + nameCamel = "LosslessCut"; + nameSourceBase = "${nameCamel}-win"; + nameSource = "${nameSourceBase}.zip"; + nameExecutable = "${nameCamel}.exe"; + owner = "mifi"; + getSymlinkCommand = if (customSymlinkCommand != null) then customSymlinkCommand + else if useMklink then (targetPath: linkPath: "mklink ${targetPath} ${linkPath}") + else (targetPath: linkPath: "ln -s ${targetPath} ${linkPath}"); +in stdenvNoCC.mkDerivation { + inherit pname version; + + src = fetchurl { + name = nameSource; + url = "https://github.com/${owner}/${nameRepo}/releases/download/v${version}/${nameSource}"; + sha256 = "1rq9frab0jl9y1mgmjhzsm734jvz0a646zq2wi5xzzspn4wikhvb"; + }; + + nativeBuildInputs = [ unzip ]; + + unpackPhase = '' + unzip $src -d ${nameSourceBase} + ''; + + sourceRoot = nameSourceBase; + + installPhase = '' + mkdir -p $out/bin $out/libexec + cd .. + mv ${nameSourceBase} $out/libexec + + '' + (getSymlinkCommand "${nameSourceBase}/${nameExecutable}" "$out/bin/${nameExecutable}"); + + meta.platforms = lib.platforms.windows; +} diff --git a/pkgs/applications/video/screenkey/default.nix b/pkgs/applications/video/screenkey/default.nix index 00ead0f89a3..4377b255fd9 100644 --- a/pkgs/applications/video/screenkey/default.nix +++ b/pkgs/applications/video/screenkey/default.nix @@ -1,9 +1,7 @@ { lib , fetchFromGitLab # native -, intltool , wrapGAppsHook -, file # not native , xorg , gobject-introspection @@ -13,22 +11,16 @@ python3.pkgs.buildPythonApplication rec { pname = "screenkey"; - version = "1.2"; + version = "1.4"; src = fetchFromGitLab { owner = "screenkey"; repo = "screenkey"; rev = "v${version}"; - sha256 = "1x13n57iy2pg3h3r994q3g5nbmh2gwk3qidmmcv0g7qa89n2gwbj"; + sha256 = "1rfngmkh01g5192pi04r1fm7vsz6hg9k3qd313sn9rl9xkjgp11l"; }; nativeBuildInputs = [ - python3.pkgs.distutils_extra - # Shouldn't be needed once https://gitlab.com/screenkey/screenkey/-/issues/122 is fixed. - intltool - # We are not sure why is this needed, but without it we get "file: command - # not found" errors during build. - file wrapGAppsHook # for setup hook gobject-introspection @@ -39,6 +31,7 @@ python3.pkgs.buildPythonApplication rec { ]; propagatedBuildInputs = with python3.pkgs; [ + Babel pycairo pygobject3 ]; |