4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
40 lines
1.2 KiB
Nix
40 lines
1.2 KiB
Nix
{ lib, stdenv, fetchFromGitHub, fetchurl, rustPlatform, runCommand } :
|
|
with rustPlatform;
|
|
|
|
buildRustPackage rec {
|
|
pname = "pax-rs";
|
|
version = "0.4.0";
|
|
|
|
meta = with 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
|
|
'';
|
|
|
|
cargoSha256 = "0wx5x7ll21bb6v34csk63kkvxdk3as720hdkaj0izdkpy0xf1knr";
|
|
}
|