nixpkgs/pkgs/by-name/sc/scrolls/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

46 lines
1.1 KiB
Nix

{ lib, stdenv, fetchurl, gcc
, libGLU, libX11, libXext, libXcursor, libpulseaudio
}:
stdenv.mkDerivation {
pname = "scrolls";
version = "2015-10-13";
meta = {
description = "Strategy collectible card game";
homepage = "https://scrolls.com/";
# http://www.reddit.com/r/Scrolls/comments/2j3pxw/linux_client_experimental/
platforms = [ "x86_64-linux" ];
license = lib.licenses.unfree;
};
src = fetchurl {
url = "https://download.scrolls.com/client/linux.tar.gz";
sha256 = "ead1fd14988aa07041fedfa7f845c756cd5077a5a402d85bfb749cb669ececec";
};
libPath = lib.makeLibraryPath [
gcc
libGLU
libX11
libXext
libXcursor
libpulseaudio
];
installPhase = ''
mkdir -p "$out/opt/Scrolls"
cp -r ../Scrolls "$out/opt/Scrolls/"
cp -r ../Scrolls_Data "$out/opt/Scrolls/"
chmod +x "$out/opt/Scrolls/Scrolls"
patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
--set-rpath "$libPath" "$out/opt/Scrolls/Scrolls"
mkdir "$out/bin"
ln -s "$out/opt/Scrolls/Scrolls" "$out/bin/Scrolls"
'';
}