From fecda1751806039ea47fba56fd2a3bd9cf11e8b5 Mon Sep 17 00:00:00 2001 From: sefidel Date: Tue, 20 Feb 2024 05:48:01 +0900 Subject: project: Initial commit --- pkgs/cider2/default.nix | 62 +++++++++++++++++++++++++++++++++++++++++++++++++ pkgs/default.nix | 5 ++++ 2 files changed, 67 insertions(+) create mode 100644 pkgs/cider2/default.nix create mode 100644 pkgs/default.nix (limited to 'pkgs') diff --git a/pkgs/cider2/default.nix b/pkgs/cider2/default.nix new file mode 100644 index 0000000..2496c8c --- /dev/null +++ b/pkgs/cider2/default.nix @@ -0,0 +1,62 @@ +{ + appimageTools, + dieHook, + lib, + makeWrapper, + requireFile, +}: + +appimageTools.wrapType2 rec { + pname = "cider2"; + version = "2.4.1"; + + src = requireFile rec { + name = "Cider-linux-appimage-x64.AppImage"; + sha256 = "1ds7grjr52ssf1q0sm9jk7hxhskfxj6b5pzrmibliglhbzblflx7"; + message = '' + Starting from Cider 2, Cider is no longer open source. + In order to install Cider 2, you must first obtain the + AppImage from Cider Collective's itch.io page: + + https://cidercollective.itch.io/cider + + Once you have downloaded the file, please use the following + commands and re-run the installation: + + nix-prefetch-url file://\$PWD/${name} + + Alternatively, you can use the following command to download the + file directly: + + nix-prefetch-url --name ${name} + ''; + }; + + extraInstallCommands = + let contents = appimageTools.extract { inherit pname version src; }; + in '' + source "${dieHook}/nix-support/setup-hook" + source "${makeWrapper}/nix-support/setup-hook" + wrapProgram $out/bin/${pname} \ + --add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}" + + install -m 444 -D ${contents}/cider.desktop -t $out/share/applications + substituteInPlace $out/share/applications/cider.desktop \ + --replace-warn 'Exec=AppRun' 'Exec=${pname}' + cp -r ${contents}/usr/share/icons $out/share + + # We introduce a dependency on the source file so that it need not be redownloaded every time + echo ${src} >> "$out/share/workspace_dependencies.pin" + ''; + + meta = with lib; { + description = "New look into listening and enjoying Apple Music in style and performance"; + homepage = "https://cidercollective.itch.io/cider"; + hydraPlatforms = [ ]; + license = licenses.unfree; + mainProgram = "cider2"; + maintainers = with maintainers; [ sefidel ]; + platforms = [ "x86_64-linux" ]; + sourceProvenance = with sourceTypes; [ binaryNativeCode ]; + }; +} diff --git a/pkgs/default.nix b/pkgs/default.nix new file mode 100644 index 0000000..ec5889c --- /dev/null +++ b/pkgs/default.nix @@ -0,0 +1,5 @@ +{ pkgs, ... }: let + callPackage = pkg: pkgs.callPackage pkg; +in { + cider2 = callPackage ./cider2 { }; +} -- cgit 1.4.1