3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/tools/pax-rs/default.nix
Benjamin Hipple eb11feaa0b treewide: change fetchCargoTarball default to opt-out
Changes the default fetcher in the Rust Platform to be the newer
`fetchCargoTarball`, and changes every application using the current default to
instead opt out.

This commit does not change any hashes or cause any rebuilds. Once integrated,
we will start deleting the opt-outs and recomputing hashes.

See #79975 for details.
2020-02-13 22:41:37 -08:00

44 lines
1.3 KiB
Nix

{ stdenv, fetchFromGitHub, fetchurl, rustPlatform, runCommand } :
with rustPlatform;
buildRustPackage rec {
pname = "pax-rs";
version = "0.4.0";
meta = with stdenv.lib; {
description = "The fastest JavaScript bundler in the galaxy.";
longDescription = ''
The fastest JavaScript bundler in the galaxy. Fully supports ECMAScript module syntax (import/export) in addition to CommonJS require(<string>).
'';
homepage = https://github.com/nathan/pax;
license = licenses.mit;
maintainers = [ maintainers.klntsky ];
platforms = platforms.linux;
};
src =
let
source = fetchFromGitHub {
owner = "nathan";
repo = "pax";
rev = "pax-v${version}";
sha256 = "1l2xpgsms0bfc0i3l0hyw4dbp6d4qdxa9vxyp704p27vvn4ndhv2";
};
cargo-lock = fetchurl {
url = "https://gist.github.com/klntsky/c7863424d7df0c379782015f6bb3b399/raw/1cf7481e33984fd1510dc77ed677606d08fa8eb6/Cargo.lock";
sha256 = "0ff1b64b99cbca1cc2ceabcd2e4f7bc3411e3a2a9fbb9db2204d9240fe38ddeb";
};
in
runCommand "pax-rs-src" {} ''
cp -R ${source} $out
chmod +w $out
cp ${cargo-lock} $out/Cargo.lock
'';
# Delete this on next update; see #79975 for details
legacyCargoFetcher = true;
cargoSha256 = "132a9vnlyp78zxiw5xrazadvx0scs7h2vbm5wz612dmh436mwnxg";
}