-
-
Save evanjs/d127854be4c1ab18d5df6a8496f9c3bb to your computer and use it in GitHub Desktop.
rs3cache expression
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ moz_overlay ? import (builtins.fetchTarball https://github.com/mozilla/nixpkgs-mozilla/archive/master.tar.gz) | |
, sources ? import nix/sources.nix { } | |
, pkgs ? import sources.nixpkgs { overlays = [ moz_overlay ]; } | |
, pythonPackages ? pkgs.python39Packages | |
, buildPythonPackage ? pythonPackages.buildPythonPackage | |
, buildPythonApplication ? pythonPackages.buildPythonApplication | |
, fetchFromGitHub ? pkgs.fetchFromGitHub | |
, rustNightly ? (pkgs.rustChannelOf { channel = "nightly"; }).rust | |
, rustPlatform ? pkgs.makeRustPlatform { cargo = rustNightly; rustc = rustNightly; } | |
, setuptools-rust ? pythonPackages.setuptools-rust | |
, stdenv ? pkgs.stdenv | |
}: | |
with stdenv; | |
with pythonPackages; | |
#buildPythonApplication rec { | |
rustPlatform.buildRustPackage rec { | |
pname = "rs3cache"; | |
version = "unstable-2021-04-11"; | |
src = fetchFromGitHub { | |
owner = "mejrs"; | |
repo = "rs3cache"; | |
rev = "975bd7000503cc33f917745ef0e5fa2710ebd371"; | |
hash = "sha256-hp3ZTuvnXR2o7/ULVpSMSoKY6ePisHkBwMUw92sxrXE="; | |
}; | |
#cargoDeps = rustPlatform.fetchCargoTarball { | |
#inherit src; | |
#name = "${pname}-${version}"; | |
#hash = "sha256-RbCrjs5fz2b7eZrVQPBg7DB+lEezC/I+rcam3c/QapQ="; | |
#}; | |
cargoHash = "sha256-RbCrjs5fz2b7eZrVQPBg7DB+lEezC/I+rcam3c/QapQ="; | |
checkPhase = '' | |
cargo test --features mockdata | |
''; | |
postBuild = '' | |
cargo build --release | |
''; | |
postInstall = '' | |
mkdir $out/bin | |
install -m755 target/release/rs3cache $out/bin | |
''; | |
nativeBuildInputs = with rustPlatform; [ pipInstallHook maturinBuildHook ]; | |
meta = with lib; { | |
homepage = "https://github.com/mejrs/rs3cache"; | |
description = "Tools and api for reading and interpreting the RuneScape 3 game cache."; | |
maintainers = with maintainers; [ evanjs ]; | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment