mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-11 15:15:36 +00:00
Merge master into staging-next
This commit is contained in:
commit
bb74d3b2df
|
@ -36,14 +36,14 @@ let
|
|||
});
|
||||
in stdenv.mkDerivation rec {
|
||||
pname = "phoc";
|
||||
version = "0.7.0";
|
||||
version = "0.7.1";
|
||||
|
||||
src = fetchFromGitLab {
|
||||
domain = "source.puri.sm";
|
||||
owner = "Librem5";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "0afiyr2slg38ksrqn19zygsmjy9k5bpwv6n7zjas3s5djr6hch45";
|
||||
sha256 = "0n188xa2pwl4258naxhz45cvipcid8y1zvlbddll9xydrrh9bwqn";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
|
|
@ -18,9 +18,9 @@
|
|||
}
|
||||
},
|
||||
"beta": {
|
||||
"version": "92.0.4515.93",
|
||||
"sha256": "077i1rw84cgcmg2k0p1ycg5pwvnhgsa3qdfsr7icrn7gmagagqd0",
|
||||
"sha256bin64": "1gf4qv8wvaagdgsinf2gprx9wcfgm8jql6870k50bi26mjqv9800",
|
||||
"version": "92.0.4515.101",
|
||||
"sha256": "1jcas265hhlqd9f63h4zw4n4xsl26c5zmjlmbf1px5icvcjfb2xd",
|
||||
"sha256bin64": "0sb5l5nzfzisvrnhcfwhdh9rn6z6pkzqz4p92c40q2mlhmjrfhj0",
|
||||
"deps": {
|
||||
"gn": {
|
||||
"version": "2021-05-07",
|
||||
|
|
|
@ -28,7 +28,7 @@ let
|
|||
else "");
|
||||
in stdenv.mkDerivation rec {
|
||||
pname = "signal-desktop";
|
||||
version = "5.8.0"; # Please backport all updates to the stable channel.
|
||||
version = "5.9.0"; # Please backport all updates to the stable channel.
|
||||
# All releases have a limited lifetime and "expire" 90 days after the release.
|
||||
# When releases "expire" the application becomes unusable until an update is
|
||||
# applied. The expiration date for the current release can be extracted with:
|
||||
|
@ -38,7 +38,7 @@ in stdenv.mkDerivation rec {
|
|||
|
||||
src = fetchurl {
|
||||
url = "https://updates.signal.org/desktop/apt/pool/main/s/signal-desktop/signal-desktop_${version}_amd64.deb";
|
||||
sha256 = "0icwmlnnnlsj2g1p2q4lf7hlhys3rakaim7bah5qkmhwkrzkk30y";
|
||||
sha256 = "1pmyi9b0b5h6mi6dwml41x4igy8rfpsv6j67izh78m5gla8wp34h";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
|
|
@ -37,14 +37,14 @@ let
|
|||
};
|
||||
in stdenv.mkDerivation rec {
|
||||
pname = "phosh";
|
||||
version = "0.11.0";
|
||||
version = "0.12.0";
|
||||
|
||||
src = fetchFromGitLab {
|
||||
domain = "source.puri.sm";
|
||||
owner = "Librem5";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "104qib4blh32s7bg6j3xza3s9syrxrvyh2wpyh5yx7v5wqarr20x";
|
||||
sha256 = "1s0lgq04qz562iri535wpwvfkmmngdpclyl329cf7rc9ihy1kjvs";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
|
36
pkgs/development/libraries/tezos-rust-libs/default.nix
Normal file
36
pkgs/development/libraries/tezos-rust-libs/default.nix
Normal file
|
@ -0,0 +1,36 @@
|
|||
{ lib, fetchFromGitLab, rustPlatform }:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "tezos-rust-libs";
|
||||
version = "1.0";
|
||||
|
||||
src = fetchFromGitLab {
|
||||
owner = "tezos";
|
||||
repo = "tezos-rust-libs";
|
||||
rev = "v${version}";
|
||||
sha256 = "1ffkzbvb0ls4wk9205g3xh2c26cmwnl68x43gh6dm9z4xsic94v5";
|
||||
};
|
||||
|
||||
cargoSha256 = "0dgyqfr3dvvdwdi1wvpd7v9j21740jy4zwrwiwknw7csb4bq9wfx";
|
||||
|
||||
preBuild = ''
|
||||
mkdir .cargo
|
||||
mv cargo-config .cargo/config
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
mkdir $out/lib/tezos-rust-libs
|
||||
cp -r rustc-bls12-381/include $out/include
|
||||
cp $out/lib/librustc_bls12_381.a $out/lib/tezos-rust-libs
|
||||
cp $out/lib/librustzcash.a $out/lib/tezos-rust-libs
|
||||
'';
|
||||
|
||||
doCheck = true;
|
||||
|
||||
meta = {
|
||||
homepage = "https://gitlab.com/tezos/tezos-rust-libs";
|
||||
description = "Tezos: all rust dependencies and their dependencies";
|
||||
license = lib.licenses.mit;
|
||||
maintainers = [ lib.maintainers.ulrikstrid ];
|
||||
};
|
||||
}
|
|
@ -107,6 +107,19 @@ let
|
|||
nativeBuildInputs = drv.nativeBuildInputs or [] ++ [ pkgs.psc-package self.pulp ];
|
||||
});
|
||||
|
||||
jsonplaceholder = super.jsonplaceholder.override (drv: {
|
||||
buildInputs = [ nodejs ];
|
||||
postInstall = ''
|
||||
exe=$out/bin/jsonplaceholder
|
||||
mkdir -p $out/bin
|
||||
cat >$exe <<EOF
|
||||
#!${pkgs.runtimeShell}
|
||||
exec -a jsonplaceholder ${nodejs}/bin/node $out/lib/node_modules/jsonplaceholder/index.js
|
||||
EOF
|
||||
chmod a+x $exe
|
||||
'';
|
||||
});
|
||||
|
||||
makam = super.makam.override {
|
||||
buildInputs = [ pkgs.nodejs pkgs.makeWrapper ];
|
||||
postFixup = ''
|
||||
|
|
|
@ -139,6 +139,7 @@
|
|||
, "json-refs"
|
||||
, "json-server"
|
||||
, "jsonlint"
|
||||
, "jsonplaceholder"
|
||||
, "kaput-cli"
|
||||
, "katex"
|
||||
, "karma"
|
||||
|
|
1779
pkgs/development/node-packages/node-packages.nix
generated
1779
pkgs/development/node-packages/node-packages.nix
generated
File diff suppressed because it is too large
Load diff
38
pkgs/development/ocaml-modules/bls12-381/default.nix
Normal file
38
pkgs/development/ocaml-modules/bls12-381/default.nix
Normal file
|
@ -0,0 +1,38 @@
|
|||
{ lib, fetchFromGitLab, buildDunePackage, ff, zarith, ctypes, tezos-rust-libs, alcotest }:
|
||||
|
||||
buildDunePackage rec {
|
||||
pname = "bls12-381";
|
||||
version = "0.3.15";
|
||||
|
||||
src = fetchFromGitLab {
|
||||
owner = "dannywillems";
|
||||
repo = "ocaml-bls12-381";
|
||||
rev = version;
|
||||
sha256 = "1s8n657fsl2gs01p7v2ffpcfzymavifhhpriyx1gq5qh4zvvw4vr";
|
||||
};
|
||||
useDune2 = true;
|
||||
|
||||
minimalOCamlVersion = "4.08";
|
||||
propagatedBuildInputs = [
|
||||
ff
|
||||
zarith
|
||||
ctypes
|
||||
tezos-rust-libs
|
||||
];
|
||||
|
||||
checkInputs = [
|
||||
alcotest
|
||||
];
|
||||
|
||||
# This is a hack to work around the hack used in the dune files
|
||||
OPAM_SWITCH_PREFIX = "${tezos-rust-libs}";
|
||||
|
||||
doCheck = true;
|
||||
|
||||
meta = {
|
||||
homepage = "https://gitlab.com/dannywillems/ocaml-bls12-381";
|
||||
description = "OCaml binding for bls12-381 from librustzcash";
|
||||
license = lib.licenses.mit;
|
||||
maintainers = [ lib.maintainers.ulrikstrid ];
|
||||
};
|
||||
}
|
32
pkgs/development/ocaml-modules/ff/default.nix
Normal file
32
pkgs/development/ocaml-modules/ff/default.nix
Normal file
|
@ -0,0 +1,32 @@
|
|||
{ lib, fetchFromGitLab, buildDunePackage, zarith, alcotest }:
|
||||
|
||||
buildDunePackage rec {
|
||||
pname = "ff";
|
||||
version = "0.4.0";
|
||||
|
||||
src = fetchFromGitLab {
|
||||
owner = "dannywillems";
|
||||
repo = "ocaml-ff";
|
||||
rev = version;
|
||||
sha256 = "1ik29srzkd0pl48p1si9p1c4f8vmx5rgm02yv2arj3vg0a1nfhdv";
|
||||
};
|
||||
|
||||
useDune2 = true;
|
||||
|
||||
propagatedBuildInputs = [
|
||||
zarith
|
||||
];
|
||||
|
||||
checkInputs = [
|
||||
alcotest
|
||||
];
|
||||
|
||||
doCheck = true;
|
||||
|
||||
meta = {
|
||||
homepage = "https://gitlab.com/dannywillems/ocaml-ff";
|
||||
description = "OCaml implementation of Finite Field operations";
|
||||
license = lib.licenses.mit;
|
||||
maintainers = [ lib.maintainers.ulrikstrid ];
|
||||
};
|
||||
}
|
|
@ -1,16 +1,16 @@
|
|||
{ lib, fetchurl, buildDunePackage
|
||||
, repr, ppx_repr, fmt, logs, mtime, stdlib-shims
|
||||
, cmdliner, progress, semaphore-compat
|
||||
, cmdliner, progress, semaphore-compat, optint
|
||||
, alcotest, crowbar, re
|
||||
}:
|
||||
|
||||
buildDunePackage rec {
|
||||
pname = "index";
|
||||
version = "1.3.1";
|
||||
version = "1.4.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/mirage/index/releases/download/${version}/index-${version}.tbz";
|
||||
sha256 = "sha256-ycZi/TFLoGRloSpjYqH5FCHWP3eyiTCIDLESEn5inuI=";
|
||||
sha256 = "13xd858c50fs651p1y8x70323ff0gzbf6zgc0a25f6xh3rsmkn4c";
|
||||
};
|
||||
|
||||
minimumOCamlVersion = "4.08";
|
||||
|
@ -28,6 +28,7 @@ buildDunePackage rec {
|
|||
progress
|
||||
repr
|
||||
semaphore-compat
|
||||
optint
|
||||
];
|
||||
|
||||
checkInputs = [
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{ lib, buildDunePackage
|
||||
, alcotest-lwt, index, irmin, irmin-layers, irmin-test, ocaml_lwt, fpath
|
||||
, alcotest-lwt, index, irmin, irmin-layers, irmin-test, ocaml_lwt, fpath, optint
|
||||
}:
|
||||
|
||||
buildDunePackage rec {
|
||||
|
@ -12,7 +12,7 @@ buildDunePackage rec {
|
|||
useDune2 = true;
|
||||
|
||||
buildInputs = [ fpath ];
|
||||
propagatedBuildInputs = [ index irmin irmin-layers ocaml_lwt ];
|
||||
propagatedBuildInputs = [ index irmin irmin-layers ocaml_lwt optint ];
|
||||
|
||||
checkInputs = [ alcotest-lwt irmin-test ];
|
||||
|
||||
|
|
|
@ -2,11 +2,11 @@
|
|||
|
||||
buildDunePackage rec {
|
||||
pname = "ppx_irmin";
|
||||
version = "2.6.0";
|
||||
version = "2.7.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/mirage/irmin/releases/download/${version}/irmin-${version}.tbz";
|
||||
sha256 = "1db134221e82c424260a0e206b640fcb82902be35eea4137af2bcd9c98d3ac0f";
|
||||
sha256 = "fac7c032f472fb369378ad2d8fe77e7cd3b3c1c6a0d7bf59980b69528891b399";
|
||||
};
|
||||
|
||||
minimumOCamlVersion = "4.08";
|
||||
|
|
|
@ -2,11 +2,11 @@
|
|||
|
||||
buildDunePackage rec {
|
||||
pname = "repr";
|
||||
version = "0.3.0";
|
||||
version = "0.4.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/mirage/${pname}/releases/download/${version}/${pname}-fuzz-${version}.tbz";
|
||||
sha256 = "sha256-2b0v5RwutvyidzEDTEb5p33IvJ+3t2IW+KVxYD1ufXQ=";
|
||||
sha256 = "1kpwgncyxcrq90dn7ilja7c5i88whc3fz4fmq1lwr0ar95d7d48p";
|
||||
};
|
||||
|
||||
minimumOCamlVersion = "4.08";
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ buildDunePackage, ppx_deriving, ppxlib, repr, alcotest, hex }:
|
||||
{ lib, buildDunePackage, ppx_deriving, ppxlib, repr, alcotest, hex }:
|
||||
|
||||
buildDunePackage {
|
||||
pname = "ppx_repr";
|
||||
|
|
13
pkgs/development/ocaml-modules/resto/acl.nix
Normal file
13
pkgs/development/ocaml-modules/resto/acl.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
{ lib, buildDunePackage, resto, uri }:
|
||||
|
||||
buildDunePackage {
|
||||
pname = "resto-acl";
|
||||
inherit (resto) src version meta useDune2 doCheck;
|
||||
|
||||
minimalOCamlVersion = "4.05";
|
||||
|
||||
propagatedBuildInputs = [
|
||||
resto
|
||||
uri
|
||||
];
|
||||
}
|
20
pkgs/development/ocaml-modules/resto/cohttp-client.nix
Normal file
20
pkgs/development/ocaml-modules/resto/cohttp-client.nix
Normal file
|
@ -0,0 +1,20 @@
|
|||
{ buildDunePackage
|
||||
, resto
|
||||
, resto-directory
|
||||
, resto-cohttp
|
||||
, uri
|
||||
, lwt
|
||||
}:
|
||||
|
||||
buildDunePackage {
|
||||
pname = "resto-cohttp-client";
|
||||
inherit (resto) src version meta useDune2 doCheck;
|
||||
|
||||
propagatedBuildInputs = [
|
||||
resto
|
||||
resto-directory
|
||||
resto-cohttp
|
||||
uri
|
||||
lwt
|
||||
];
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
{ lib
|
||||
, buildDunePackage
|
||||
, resto
|
||||
, resto-directory
|
||||
, resto-acl
|
||||
, resto-cohttp
|
||||
, resto-cohttp-client
|
||||
, resto-cohttp-server
|
||||
, uri
|
||||
, lwt
|
||||
}:
|
||||
|
||||
buildDunePackage {
|
||||
pname = "resto-cohttp-self-serving-client";
|
||||
inherit (resto) src version meta useDune2 doCheck;
|
||||
|
||||
propagatedBuildInputs = [
|
||||
resto
|
||||
resto-directory
|
||||
resto-acl
|
||||
resto-cohttp
|
||||
resto-cohttp-client
|
||||
resto-cohttp-server
|
||||
uri
|
||||
lwt
|
||||
];
|
||||
}
|
25
pkgs/development/ocaml-modules/resto/cohttp-server.nix
Normal file
25
pkgs/development/ocaml-modules/resto/cohttp-server.nix
Normal file
|
@ -0,0 +1,25 @@
|
|||
{ lib
|
||||
, buildDunePackage
|
||||
, resto
|
||||
, resto-directory
|
||||
, resto-acl
|
||||
, resto-cohttp
|
||||
, cohttp-lwt-unix
|
||||
, conduit-lwt-unix
|
||||
, lwt
|
||||
}:
|
||||
|
||||
buildDunePackage {
|
||||
pname = "resto-cohttp-server";
|
||||
inherit (resto) src version meta useDune2 doCheck;
|
||||
|
||||
propagatedBuildInputs = [
|
||||
resto
|
||||
resto-directory
|
||||
resto-acl
|
||||
resto-cohttp
|
||||
cohttp-lwt-unix
|
||||
conduit-lwt-unix
|
||||
lwt
|
||||
];
|
||||
}
|
12
pkgs/development/ocaml-modules/resto/cohttp.nix
Normal file
12
pkgs/development/ocaml-modules/resto/cohttp.nix
Normal file
|
@ -0,0 +1,12 @@
|
|||
{ buildDunePackage, resto, resto-directory, cohttp-lwt }:
|
||||
|
||||
buildDunePackage {
|
||||
pname = "resto-cohttp";
|
||||
inherit (resto) src version meta useDune2 doCheck;
|
||||
|
||||
propagatedBuildInputs = [
|
||||
resto
|
||||
resto-directory
|
||||
cohttp-lwt
|
||||
];
|
||||
}
|
28
pkgs/development/ocaml-modules/resto/default.nix
Normal file
28
pkgs/development/ocaml-modules/resto/default.nix
Normal file
|
@ -0,0 +1,28 @@
|
|||
{ lib, fetchFromGitLab, buildDunePackage, uri }:
|
||||
|
||||
buildDunePackage rec {
|
||||
pname = "resto";
|
||||
version = "0.6.1";
|
||||
src = fetchFromGitLab {
|
||||
owner = "nomadic-labs";
|
||||
repo = "resto";
|
||||
rev = "v${version}";
|
||||
sha256 = "13h3zga7h2jhgbyda1q53szbpxcz3vvy3c51mlqk3jh9jq2wrn87";
|
||||
};
|
||||
|
||||
useDune2 = true;
|
||||
|
||||
propagatedBuildInputs = [
|
||||
uri
|
||||
];
|
||||
|
||||
# resto has infinite recursion in their tests
|
||||
doCheck = false;
|
||||
|
||||
meta = {
|
||||
description = "A minimal OCaml library for type-safe HTTP/JSON RPCs";
|
||||
homepage = "https://gitlab.com/nomadic-labs/resto";
|
||||
license = lib.licenses.mit;
|
||||
maintainers = [ lib.maintainers.ulrikstrid ];
|
||||
};
|
||||
}
|
11
pkgs/development/ocaml-modules/resto/directory.nix
Normal file
11
pkgs/development/ocaml-modules/resto/directory.nix
Normal file
|
@ -0,0 +1,11 @@
|
|||
{ lib, buildDunePackage, resto, resto-json, lwt }:
|
||||
|
||||
buildDunePackage {
|
||||
pname = "resto-directory";
|
||||
inherit (resto) src version meta useDune2 doCheck;
|
||||
|
||||
propagatedBuildInputs = [
|
||||
resto
|
||||
lwt
|
||||
];
|
||||
}
|
13
pkgs/development/ocaml-modules/resto/ezresto-directory.nix
Normal file
13
pkgs/development/ocaml-modules/resto/ezresto-directory.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
{ buildDunePackage, resto, resto-directory, ezresto, lwt }:
|
||||
|
||||
buildDunePackage {
|
||||
pname = "ezresto-directory";
|
||||
inherit (resto) src version meta useDune2 doCheck;
|
||||
|
||||
propagatedBuildInputs = [
|
||||
ezresto
|
||||
resto-directory
|
||||
resto
|
||||
lwt
|
||||
];
|
||||
}
|
12
pkgs/development/ocaml-modules/resto/ezresto.nix
Normal file
12
pkgs/development/ocaml-modules/resto/ezresto.nix
Normal file
|
@ -0,0 +1,12 @@
|
|||
{ lib, buildDunePackage, resto, resto-json, uri }:
|
||||
|
||||
buildDunePackage {
|
||||
pname = "ezresto";
|
||||
inherit (resto) src version meta useDune2 doCheck;
|
||||
|
||||
propagatedBuildInputs = [
|
||||
uri
|
||||
resto
|
||||
resto-json
|
||||
];
|
||||
}
|
12
pkgs/development/ocaml-modules/resto/json.nix
Normal file
12
pkgs/development/ocaml-modules/resto/json.nix
Normal file
|
@ -0,0 +1,12 @@
|
|||
{ lib, buildDunePackage, resto, json-data-encoding, json-data-encoding-bson }:
|
||||
|
||||
buildDunePackage {
|
||||
pname = "resto-json";
|
||||
inherit (resto) src version meta useDune2 doCheck;
|
||||
|
||||
propagatedBuildInputs = [
|
||||
resto
|
||||
json-data-encoding
|
||||
json-data-encoding-bson
|
||||
];
|
||||
}
|
|
@ -7,14 +7,14 @@
|
|||
|
||||
buildPythonPackage rec {
|
||||
pname = "ailment";
|
||||
version = "9.0.8761";
|
||||
version = "9.0.9031";
|
||||
disabled = pythonOlder "3.6";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "angr";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-UAtVWh3BBZZmU5+BR0+2B+rivzR4E7bZK1ro1uKngtE=";
|
||||
sha256 = "sha256-xyNTcGTGH8030CJif6an+kDZIfOUVDMiRhFamVajAzk=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [ pyvex ];
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
, GitPython
|
||||
, itanium_demangler
|
||||
, mulpyplexer
|
||||
, nampa
|
||||
, networkx
|
||||
, progressbar2
|
||||
, protobuf
|
||||
|
@ -42,14 +43,14 @@ in
|
|||
|
||||
buildPythonPackage rec {
|
||||
pname = "angr";
|
||||
version = "9.0.8761";
|
||||
version = "9.0.9031";
|
||||
disabled = pythonOlder "3.6";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = pname;
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-vPqCezHYJP3ue3/J/Pni9jPvSJ+om7nAVgPTU6z5xBE=";
|
||||
sha256 = "sha256-qWAz9SHfQU0cdk4yVekJn5OIDPJPbi63CDdlHDq1Opw=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
|
@ -65,6 +66,7 @@ buildPythonPackage rec {
|
|||
GitPython
|
||||
itanium_demangler
|
||||
mulpyplexer
|
||||
nampa
|
||||
networkx
|
||||
progressbar2
|
||||
protobuf
|
||||
|
@ -83,7 +85,13 @@ buildPythonPackage rec {
|
|||
doCheck = false;
|
||||
|
||||
# See http://angr.io/api-doc/
|
||||
pythonImportsCheck = [ "angr" "claripy" "cle" "pyvex" "archinfo" ];
|
||||
pythonImportsCheck = [
|
||||
"angr"
|
||||
"claripy"
|
||||
"cle"
|
||||
"pyvex"
|
||||
"archinfo"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Powerful and user-friendly binary analysis platform";
|
||||
|
|
|
@ -9,14 +9,14 @@
|
|||
|
||||
buildPythonPackage rec {
|
||||
pname = "angrop";
|
||||
version = "9.0.8761";
|
||||
version = "9.0.9031";
|
||||
disabled = pythonOlder "3.6";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "angr";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-M/4kEESL9OH4KyPgsrlVzm54OtU28pDox5qtV7Up2ew=";
|
||||
sha256 = "sha256-3q/3iFR0FFOcvgmNVXtgi1Spu5xfXNJFy+QoIh8amOY=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
|
|
|
@ -7,13 +7,13 @@
|
|||
|
||||
buildPythonPackage rec {
|
||||
pname = "archinfo";
|
||||
version = "9.0.8761";
|
||||
version = "9.0.9031";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "angr";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-mdry5JQIW1b2p9a+c6RfHE6HYs54WKFofPkzFCgpUXg=";
|
||||
sha256 = "sha256-pzBMyw5FwQV1FyhvOxUq39s96p0KKSrkEvJzhJQdS4E=";
|
||||
};
|
||||
|
||||
checkInputs = [
|
||||
|
|
|
@ -13,14 +13,14 @@
|
|||
|
||||
buildPythonPackage rec {
|
||||
pname = "claripy";
|
||||
version = "9.0.8761";
|
||||
version = "9.0.9031";
|
||||
disabled = pythonOlder "3.6";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "angr";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-MEG6J7FBjufFqvmfV+LTtgDJb8eZuUrDq4am/mnYCZI=";
|
||||
sha256 = "sha256-UCmt2Vm8OWyKa0fmPlGuvzaFddUWs6quavUgIZasoJg=";
|
||||
};
|
||||
|
||||
# Use upstream z3 implementation
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
let
|
||||
# The binaries are following the argr projects release cycle
|
||||
version = "9.0.8761";
|
||||
version = "9.0.9031";
|
||||
|
||||
# Binary files from https://github.com/angr/binaries (only used for testing and only here)
|
||||
binaries = fetchFromGitHub {
|
||||
|
@ -35,7 +35,7 @@ buildPythonPackage rec {
|
|||
owner = "angr";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-cJpwtAX2cck/SoTfm8G93Imyyqn1B2Izkxk9O7WtRrk=";
|
||||
sha256 = "sha256-+9aW7J8FXuKtU20dpqnoj37McPxzbkjKuYZIO8QeFF0=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
|
|
41
pkgs/development/python-modules/nampa/default.nix
Normal file
41
pkgs/development/python-modules/nampa/default.nix
Normal file
|
@ -0,0 +1,41 @@
|
|||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchFromGitHub
|
||||
, future
|
||||
, pytestCheckHook
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "nampa";
|
||||
version = "1.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "thebabush";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "14b6xjm497wrfw4kv24zhsvz2l6zknvx36w8i754hfwz3s3fsl6a";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
future
|
||||
];
|
||||
|
||||
checkInputs = [
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
# https://github.com/thebabush/nampa/pull/13
|
||||
substituteInPlace setup.py \
|
||||
--replace "0.1.1" "${version}"
|
||||
'';
|
||||
|
||||
pythonImportsCheck = [ "nampa" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Python implementation of the FLIRT technology";
|
||||
homepage = "https://github.com/thebabush/nampa";
|
||||
license = licenses.lgpl3Only;
|
||||
maintainers = with maintainers; [ fab ];
|
||||
};
|
||||
}
|
|
@ -1,8 +1,15 @@
|
|||
{ buildPythonPackage, isPy3k, lib, fetchFromGitHub, setuptools-scm, toml, pytest }:
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, isPy3k
|
||||
, fetchFromGitHub
|
||||
, setuptools-scm
|
||||
, toml
|
||||
, pytestCheckHook
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "pure_eval";
|
||||
version = "0.1.0";
|
||||
version = "0.2.1";
|
||||
|
||||
disabled = !isPy3k;
|
||||
|
||||
|
@ -10,15 +17,24 @@ buildPythonPackage rec {
|
|||
owner = "alexmojaki";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "1d3gpc9mrmwdk6l87x7ll23vwv6l8l2iqvi63r86j7bj5s8m2ci8";
|
||||
sha256 = "sha256-+Vucu16NFPtQ23AbBH/cQU+klxp6DMicSScbnKegLZI=";
|
||||
};
|
||||
|
||||
SETUPTOOLS_SCM_PRETEND_VERSION = version;
|
||||
|
||||
buildInputs = [ setuptools-scm ];
|
||||
propagatedBuildInputs = [ toml ];
|
||||
buildInputs = [
|
||||
setuptools-scm
|
||||
];
|
||||
|
||||
checkInputs = [ pytest ];
|
||||
propagatedBuildInputs = [
|
||||
toml
|
||||
];
|
||||
|
||||
checkInputs = [
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
pythonImportsCheck = [ "pure_eval" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Safely evaluate AST nodes without side effects";
|
||||
|
|
|
@ -11,11 +11,11 @@
|
|||
|
||||
buildPythonPackage rec {
|
||||
pname = "pyvex";
|
||||
version = "9.0.8761";
|
||||
version = "9.0.9031";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "sha256-3aLpMiOJfgELfnpqTyXAL6Uofbm4UW4VRRsYzTTAofg=";
|
||||
sha256 = "sha256-bl6bWv4c+tlaWcxrYCiljC9C+wAZZVyk+1O0rlb4kxA=";
|
||||
};
|
||||
|
||||
postPatch = lib.optionalString stdenv.isDarwin ''
|
||||
|
|
|
@ -14,14 +14,14 @@
|
|||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "stack_data";
|
||||
version = "0.0.7";
|
||||
pname = "stack-data";
|
||||
version = "0.1.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "alexmojaki";
|
||||
repo = pname;
|
||||
repo = "stack_data";
|
||||
rev = "v${version}";
|
||||
sha256 = "148lhxihak8jm5dvryhsiykmn3s4mrlba8ki4dy1nbd8jnz06a4w";
|
||||
sha256 = "sha256-dRIRDMq0tc1QuBHvppPwJA5PVGHyVRhoBlX5BsdDzec=";
|
||||
};
|
||||
|
||||
SETUPTOOLS_SCM_PRETEND_VERSION = version;
|
||||
|
@ -45,6 +45,14 @@ buildPythonPackage rec {
|
|||
typeguard
|
||||
];
|
||||
|
||||
disabledTests = [
|
||||
# AssertionError
|
||||
"test_variables"
|
||||
"test_example"
|
||||
];
|
||||
|
||||
pythonImportsCheck = [ "stack_data" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Extract data from stack frames and tracebacks";
|
||||
homepage = "https://github.com/alexmojaki/stack_data/";
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
|
||||
buildGoModule rec {
|
||||
pname = "open-policy-agent";
|
||||
version = "0.30.0";
|
||||
version = "0.30.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "open-policy-agent";
|
||||
repo = "opa";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-AjNr+t30ftF92+cEfvt8iHBDVD/SO52ojJRLAkYF9l4=";
|
||||
sha256 = "sha256-pyqG8k2jHUhYZ1ftfAjxpJ4H1P1uWfqSdGcyR7pw1rE=";
|
||||
};
|
||||
vendorSha256 = null;
|
||||
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
|
||||
# `cypress-example-kitchensink`
|
||||
|
||||
This directory 'packages' [cypress-example-kitchensink](https://github.com/cypress-io/cypress-example-kitchensink),
|
||||
which is used in `cypress.passthru.tests`.
|
||||
|
||||
The app is not really intended for deployment, so I didn't bother with actual packaging, just testing.
|
||||
If your real-world app looks like `cypress-example-kitchensink`, you'll want to use Nix multiple outputs so you don't deploy your test videos along with your app.
|
||||
Alternatively, you can set it up so that one derivation builds your server exe and another derivation takes that server exe and runs it with the cypress e2e tests.
|
||||
|
||||
## Peculiarities
|
||||
|
||||
**cypress and Cypress** are distinct names.
|
||||
- `cypress` is the npm module, containing the executable `cypress`
|
||||
- whereas the executable `Cypress` comes from `pkgs.cypress`, a binary distribution (as of writing) by cypress.io.
|
||||
|
||||
**updateScript** is not provided for this example project. This seems preferable,
|
||||
because updates to it aren't particularly valuable and have a significant overhead.
|
||||
The goal is to smoke test `cypress`; not run the latest test suite (which it isn't anyway).
|
||||
|
||||
## Updating
|
||||
|
||||
- update the hash in `src.nix`
|
||||
- run `regen-nix`
|
|
@ -0,0 +1,17 @@
|
|||
# This file has been generated by node2nix 1.9.0. Do not edit!
|
||||
|
||||
{pkgs ? import <nixpkgs> {
|
||||
inherit system;
|
||||
}, system ? builtins.currentSystem, nodejs ? pkgs."nodejs-12_x"}:
|
||||
|
||||
let
|
||||
nodeEnv = import ./node-env.nix {
|
||||
inherit (pkgs) stdenv lib python2 runCommand writeTextFile;
|
||||
inherit pkgs nodejs;
|
||||
libtool = if pkgs.stdenv.isDarwin then pkgs.darwin.cctools else null;
|
||||
};
|
||||
in
|
||||
import ./node-packages.nix {
|
||||
inherit (pkgs) fetchurl nix-gitignore stdenv lib fetchgit callPackage;
|
||||
inherit nodeEnv;
|
||||
}
|
|
@ -0,0 +1,59 @@
|
|||
{ callPackage
|
||||
, cypress
|
||||
, nodejs-12_x
|
||||
, # FIXME: duplicated from ./regen-nix. node2nix should expose this
|
||||
nodePackages
|
||||
, xorg
|
||||
, pkgs
|
||||
, stdenv
|
||||
,
|
||||
}:
|
||||
|
||||
let
|
||||
fromNode2nix = import ./cypress-example-kitchensink.nix {
|
||||
inherit pkgs;
|
||||
};
|
||||
|
||||
nodeDependencies = fromNode2nix.shell.nodeDependencies.overrideAttrs (o: {
|
||||
CYPRESS_INSTALL_BINARY = "0";
|
||||
PUPPETEER_SKIP_DOWNLOAD = "1";
|
||||
});
|
||||
|
||||
fontConfigEtc = (
|
||||
pkgs.nixos { config.fonts.fontconfig.enable = true; }
|
||||
).config.environment.etc.fonts.source;
|
||||
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
name = "cypress-example-kitchensink";
|
||||
src = callPackage ./src.nix { };
|
||||
passthru.fc = fontConfigEtc;
|
||||
nativeBuildInputs = [
|
||||
cypress
|
||||
nodejs-12_x
|
||||
xorg.xorgserver
|
||||
nodePackages.jsonplaceholder
|
||||
];
|
||||
FONTCONFIG_PATH = fontConfigEtc;
|
||||
postPatch = ''
|
||||
# Use our own offline backend. 15011 means js0n ;)
|
||||
sed -e 's^https://jsonplaceholder.cypress.io^http://localhost:15011^g' -i $(find . -type f)
|
||||
'';
|
||||
buildPhase = ''
|
||||
ln -s ${nodeDependencies}/lib/node_modules ./node_modules
|
||||
PATH="${nodeDependencies}/bin:$PATH"
|
||||
runHook preBuild
|
||||
PORT=15011 jsonplaceholder &
|
||||
# assumption: jsonplaceholder start far quicker than cypress run
|
||||
|
||||
export CYPRESS_RUN_BINARY=${cypress}/bin/Cypress
|
||||
export HOME=$PWD/home
|
||||
mkdir $HOME
|
||||
npm run test
|
||||
runHook postBuild
|
||||
'';
|
||||
installPhase = ''
|
||||
mkdir $out
|
||||
cp -r cypress/videos $out/
|
||||
'';
|
||||
}
|
|
@ -0,0 +1,567 @@
|
|||
# This file originates from node2nix
|
||||
|
||||
{lib, stdenv, nodejs, python2, pkgs, libtool, runCommand, writeTextFile}:
|
||||
|
||||
let
|
||||
# Workaround to cope with utillinux in Nixpkgs 20.09 and util-linux in Nixpkgs master
|
||||
utillinux = if pkgs ? utillinux then pkgs.utillinux else pkgs.util-linux;
|
||||
|
||||
python = if nodejs ? python then nodejs.python else python2;
|
||||
|
||||
# Create a tar wrapper that filters all the 'Ignoring unknown extended header keyword' noise
|
||||
tarWrapper = runCommand "tarWrapper" {} ''
|
||||
mkdir -p $out/bin
|
||||
|
||||
cat > $out/bin/tar <<EOF
|
||||
#! ${stdenv.shell} -e
|
||||
$(type -p tar) "\$@" --warning=no-unknown-keyword --delay-directory-restore
|
||||
EOF
|
||||
|
||||
chmod +x $out/bin/tar
|
||||
'';
|
||||
|
||||
# Function that generates a TGZ file from a NPM project
|
||||
buildNodeSourceDist =
|
||||
{ name, version, src, ... }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "node-tarball-${name}-${version}";
|
||||
inherit src;
|
||||
buildInputs = [ nodejs ];
|
||||
buildPhase = ''
|
||||
export HOME=$TMPDIR
|
||||
tgzFile=$(npm pack | tail -n 1) # Hooks to the pack command will add output (https://docs.npmjs.com/misc/scripts)
|
||||
'';
|
||||
installPhase = ''
|
||||
mkdir -p $out/tarballs
|
||||
mv $tgzFile $out/tarballs
|
||||
mkdir -p $out/nix-support
|
||||
echo "file source-dist $out/tarballs/$tgzFile" >> $out/nix-support/hydra-build-products
|
||||
'';
|
||||
};
|
||||
|
||||
includeDependencies = {dependencies}:
|
||||
lib.optionalString (dependencies != [])
|
||||
(lib.concatMapStrings (dependency:
|
||||
''
|
||||
# Bundle the dependencies of the package
|
||||
mkdir -p node_modules
|
||||
cd node_modules
|
||||
|
||||
# Only include dependencies if they don't exist. They may also be bundled in the package.
|
||||
if [ ! -e "${dependency.name}" ]
|
||||
then
|
||||
${composePackage dependency}
|
||||
fi
|
||||
|
||||
cd ..
|
||||
''
|
||||
) dependencies);
|
||||
|
||||
# Recursively composes the dependencies of a package
|
||||
composePackage = { name, packageName, src, dependencies ? [], ... }@args:
|
||||
builtins.addErrorContext "while evaluating node package '${packageName}'" ''
|
||||
DIR=$(pwd)
|
||||
cd $TMPDIR
|
||||
|
||||
unpackFile ${src}
|
||||
|
||||
# Make the base dir in which the target dependency resides first
|
||||
mkdir -p "$(dirname "$DIR/${packageName}")"
|
||||
|
||||
if [ -f "${src}" ]
|
||||
then
|
||||
# Figure out what directory has been unpacked
|
||||
packageDir="$(find . -maxdepth 1 -type d | tail -1)"
|
||||
|
||||
# Restore write permissions to make building work
|
||||
find "$packageDir" -type d -exec chmod u+x {} \;
|
||||
chmod -R u+w "$packageDir"
|
||||
|
||||
# Move the extracted tarball into the output folder
|
||||
mv "$packageDir" "$DIR/${packageName}"
|
||||
elif [ -d "${src}" ]
|
||||
then
|
||||
# Get a stripped name (without hash) of the source directory.
|
||||
# On old nixpkgs it's already set internally.
|
||||
if [ -z "$strippedName" ]
|
||||
then
|
||||
strippedName="$(stripHash ${src})"
|
||||
fi
|
||||
|
||||
# Restore write permissions to make building work
|
||||
chmod -R u+w "$strippedName"
|
||||
|
||||
# Move the extracted directory into the output folder
|
||||
mv "$strippedName" "$DIR/${packageName}"
|
||||
fi
|
||||
|
||||
# Unset the stripped name to not confuse the next unpack step
|
||||
unset strippedName
|
||||
|
||||
# Include the dependencies of the package
|
||||
cd "$DIR/${packageName}"
|
||||
${includeDependencies { inherit dependencies; }}
|
||||
cd ..
|
||||
${lib.optionalString (builtins.substring 0 1 packageName == "@") "cd .."}
|
||||
'';
|
||||
|
||||
pinpointDependencies = {dependencies, production}:
|
||||
let
|
||||
pinpointDependenciesFromPackageJSON = writeTextFile {
|
||||
name = "pinpointDependencies.js";
|
||||
text = ''
|
||||
var fs = require('fs');
|
||||
var path = require('path');
|
||||
|
||||
function resolveDependencyVersion(location, name) {
|
||||
if(location == process.env['NIX_STORE']) {
|
||||
return null;
|
||||
} else {
|
||||
var dependencyPackageJSON = path.join(location, "node_modules", name, "package.json");
|
||||
|
||||
if(fs.existsSync(dependencyPackageJSON)) {
|
||||
var dependencyPackageObj = JSON.parse(fs.readFileSync(dependencyPackageJSON));
|
||||
|
||||
if(dependencyPackageObj.name == name) {
|
||||
return dependencyPackageObj.version;
|
||||
}
|
||||
} else {
|
||||
return resolveDependencyVersion(path.resolve(location, ".."), name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function replaceDependencies(dependencies) {
|
||||
if(typeof dependencies == "object" && dependencies !== null) {
|
||||
for(var dependency in dependencies) {
|
||||
var resolvedVersion = resolveDependencyVersion(process.cwd(), dependency);
|
||||
|
||||
if(resolvedVersion === null) {
|
||||
process.stderr.write("WARNING: cannot pinpoint dependency: "+dependency+", context: "+process.cwd()+"\n");
|
||||
} else {
|
||||
dependencies[dependency] = resolvedVersion;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Read the package.json configuration */
|
||||
var packageObj = JSON.parse(fs.readFileSync('./package.json'));
|
||||
|
||||
/* Pinpoint all dependencies */
|
||||
replaceDependencies(packageObj.dependencies);
|
||||
if(process.argv[2] == "development") {
|
||||
replaceDependencies(packageObj.devDependencies);
|
||||
}
|
||||
replaceDependencies(packageObj.optionalDependencies);
|
||||
|
||||
/* Write the fixed package.json file */
|
||||
fs.writeFileSync("package.json", JSON.stringify(packageObj, null, 2));
|
||||
'';
|
||||
};
|
||||
in
|
||||
''
|
||||
node ${pinpointDependenciesFromPackageJSON} ${if production then "production" else "development"}
|
||||
|
||||
${lib.optionalString (dependencies != [])
|
||||
''
|
||||
if [ -d node_modules ]
|
||||
then
|
||||
cd node_modules
|
||||
${lib.concatMapStrings (dependency: pinpointDependenciesOfPackage dependency) dependencies}
|
||||
cd ..
|
||||
fi
|
||||
''}
|
||||
'';
|
||||
|
||||
# Recursively traverses all dependencies of a package and pinpoints all
|
||||
# dependencies in the package.json file to the versions that are actually
|
||||
# being used.
|
||||
|
||||
pinpointDependenciesOfPackage = { packageName, dependencies ? [], production ? true, ... }@args:
|
||||
''
|
||||
if [ -d "${packageName}" ]
|
||||
then
|
||||
cd "${packageName}"
|
||||
${pinpointDependencies { inherit dependencies production; }}
|
||||
cd ..
|
||||
${lib.optionalString (builtins.substring 0 1 packageName == "@") "cd .."}
|
||||
fi
|
||||
'';
|
||||
|
||||
# Extract the Node.js source code which is used to compile packages with
|
||||
# native bindings
|
||||
nodeSources = runCommand "node-sources" {} ''
|
||||
tar --no-same-owner --no-same-permissions -xf ${nodejs.src}
|
||||
mv node-* $out
|
||||
'';
|
||||
|
||||
# Script that adds _integrity fields to all package.json files to prevent NPM from consulting the cache (that is empty)
|
||||
addIntegrityFieldsScript = writeTextFile {
|
||||
name = "addintegrityfields.js";
|
||||
text = ''
|
||||
var fs = require('fs');
|
||||
var path = require('path');
|
||||
|
||||
function augmentDependencies(baseDir, dependencies) {
|
||||
for(var dependencyName in dependencies) {
|
||||
var dependency = dependencies[dependencyName];
|
||||
|
||||
// Open package.json and augment metadata fields
|
||||
var packageJSONDir = path.join(baseDir, "node_modules", dependencyName);
|
||||
var packageJSONPath = path.join(packageJSONDir, "package.json");
|
||||
|
||||
if(fs.existsSync(packageJSONPath)) { // Only augment packages that exist. Sometimes we may have production installs in which development dependencies can be ignored
|
||||
console.log("Adding metadata fields to: "+packageJSONPath);
|
||||
var packageObj = JSON.parse(fs.readFileSync(packageJSONPath));
|
||||
|
||||
if(dependency.integrity) {
|
||||
packageObj["_integrity"] = dependency.integrity;
|
||||
} else {
|
||||
packageObj["_integrity"] = "sha1-000000000000000000000000000="; // When no _integrity string has been provided (e.g. by Git dependencies), add a dummy one. It does not seem to harm and it bypasses downloads.
|
||||
}
|
||||
|
||||
if(dependency.resolved) {
|
||||
packageObj["_resolved"] = dependency.resolved; // Adopt the resolved property if one has been provided
|
||||
} else {
|
||||
packageObj["_resolved"] = dependency.version; // Set the resolved version to the version identifier. This prevents NPM from cloning Git repositories.
|
||||
}
|
||||
|
||||
if(dependency.from !== undefined) { // Adopt from property if one has been provided
|
||||
packageObj["_from"] = dependency.from;
|
||||
}
|
||||
|
||||
fs.writeFileSync(packageJSONPath, JSON.stringify(packageObj, null, 2));
|
||||
}
|
||||
|
||||
// Augment transitive dependencies
|
||||
if(dependency.dependencies !== undefined) {
|
||||
augmentDependencies(packageJSONDir, dependency.dependencies);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(fs.existsSync("./package-lock.json")) {
|
||||
var packageLock = JSON.parse(fs.readFileSync("./package-lock.json"));
|
||||
|
||||
if(![1, 2].includes(packageLock.lockfileVersion)) {
|
||||
process.stderr.write("Sorry, I only understand lock file versions 1 and 2!\n");
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
if(packageLock.dependencies !== undefined) {
|
||||
augmentDependencies(".", packageLock.dependencies);
|
||||
}
|
||||
}
|
||||
'';
|
||||
};
|
||||
|
||||
# Reconstructs a package-lock file from the node_modules/ folder structure and package.json files with dummy sha1 hashes
|
||||
reconstructPackageLock = writeTextFile {
|
||||
name = "addintegrityfields.js";
|
||||
text = ''
|
||||
var fs = require('fs');
|
||||
var path = require('path');
|
||||
|
||||
var packageObj = JSON.parse(fs.readFileSync("package.json"));
|
||||
|
||||
var lockObj = {
|
||||
name: packageObj.name,
|
||||
version: packageObj.version,
|
||||
lockfileVersion: 1,
|
||||
requires: true,
|
||||
dependencies: {}
|
||||
};
|
||||
|
||||
function augmentPackageJSON(filePath, dependencies) {
|
||||
var packageJSON = path.join(filePath, "package.json");
|
||||
if(fs.existsSync(packageJSON)) {
|
||||
var packageObj = JSON.parse(fs.readFileSync(packageJSON));
|
||||
dependencies[packageObj.name] = {
|
||||
version: packageObj.version,
|
||||
integrity: "sha1-000000000000000000000000000=",
|
||||
dependencies: {}
|
||||
};
|
||||
processDependencies(path.join(filePath, "node_modules"), dependencies[packageObj.name].dependencies);
|
||||
}
|
||||
}
|
||||
|
||||
function processDependencies(dir, dependencies) {
|
||||
if(fs.existsSync(dir)) {
|
||||
var files = fs.readdirSync(dir);
|
||||
|
||||
files.forEach(function(entry) {
|
||||
var filePath = path.join(dir, entry);
|
||||
var stats = fs.statSync(filePath);
|
||||
|
||||
if(stats.isDirectory()) {
|
||||
if(entry.substr(0, 1) == "@") {
|
||||
// When we encounter a namespace folder, augment all packages belonging to the scope
|
||||
var pkgFiles = fs.readdirSync(filePath);
|
||||
|
||||
pkgFiles.forEach(function(entry) {
|
||||
if(stats.isDirectory()) {
|
||||
var pkgFilePath = path.join(filePath, entry);
|
||||
augmentPackageJSON(pkgFilePath, dependencies);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
augmentPackageJSON(filePath, dependencies);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
processDependencies("node_modules", lockObj.dependencies);
|
||||
|
||||
fs.writeFileSync("package-lock.json", JSON.stringify(lockObj, null, 2));
|
||||
'';
|
||||
};
|
||||
|
||||
prepareAndInvokeNPM = {packageName, bypassCache, reconstructLock, npmFlags, production}:
|
||||
let
|
||||
forceOfflineFlag = if bypassCache then "--offline" else "--registry http://www.example.com";
|
||||
in
|
||||
''
|
||||
# Pinpoint the versions of all dependencies to the ones that are actually being used
|
||||
echo "pinpointing versions of dependencies..."
|
||||
source $pinpointDependenciesScriptPath
|
||||
|
||||
# Patch the shebangs of the bundled modules to prevent them from
|
||||
# calling executables outside the Nix store as much as possible
|
||||
patchShebangs .
|
||||
|
||||
# Deploy the Node.js package by running npm install. Since the
|
||||
# dependencies have been provided already by ourselves, it should not
|
||||
# attempt to install them again, which is good, because we want to make
|
||||
# it Nix's responsibility. If it needs to install any dependencies
|
||||
# anyway (e.g. because the dependency parameters are
|
||||
# incomplete/incorrect), it fails.
|
||||
#
|
||||
# The other responsibilities of NPM are kept -- version checks, build
|
||||
# steps, postprocessing etc.
|
||||
|
||||
export HOME=$TMPDIR
|
||||
cd "${packageName}"
|
||||
runHook preRebuild
|
||||
|
||||
${lib.optionalString bypassCache ''
|
||||
${lib.optionalString reconstructLock ''
|
||||
if [ -f package-lock.json ]
|
||||
then
|
||||
echo "WARNING: Reconstruct lock option enabled, but a lock file already exists!"
|
||||
echo "This will most likely result in version mismatches! We will remove the lock file and regenerate it!"
|
||||
rm package-lock.json
|
||||
else
|
||||
echo "No package-lock.json file found, reconstructing..."
|
||||
fi
|
||||
|
||||
node ${reconstructPackageLock}
|
||||
''}
|
||||
|
||||
node ${addIntegrityFieldsScript}
|
||||
''}
|
||||
|
||||
npm ${forceOfflineFlag} --nodedir=${nodeSources} ${npmFlags} ${lib.optionalString production "--production"} rebuild
|
||||
|
||||
if [ "''${dontNpmInstall-}" != "1" ]
|
||||
then
|
||||
# NPM tries to download packages even when they already exist if npm-shrinkwrap is used.
|
||||
rm -f npm-shrinkwrap.json
|
||||
|
||||
npm ${forceOfflineFlag} --nodedir=${nodeSources} ${npmFlags} ${lib.optionalString production "--production"} install
|
||||
fi
|
||||
'';
|
||||
|
||||
# Builds and composes an NPM package including all its dependencies
|
||||
buildNodePackage =
|
||||
{ name
|
||||
, packageName
|
||||
, version
|
||||
, dependencies ? []
|
||||
, buildInputs ? []
|
||||
, production ? true
|
||||
, npmFlags ? ""
|
||||
, dontNpmInstall ? false
|
||||
, bypassCache ? false
|
||||
, reconstructLock ? false
|
||||
, preRebuild ? ""
|
||||
, dontStrip ? true
|
||||
, unpackPhase ? "true"
|
||||
, buildPhase ? "true"
|
||||
, ... }@args:
|
||||
|
||||
let
|
||||
extraArgs = removeAttrs args [ "name" "dependencies" "buildInputs" "dontStrip" "dontNpmInstall" "preRebuild" "unpackPhase" "buildPhase" ];
|
||||
in
|
||||
stdenv.mkDerivation ({
|
||||
name = "node_${name}-${version}";
|
||||
buildInputs = [ tarWrapper python nodejs ]
|
||||
++ lib.optional (stdenv.isLinux) utillinux
|
||||
++ lib.optional (stdenv.isDarwin) libtool
|
||||
++ buildInputs;
|
||||
|
||||
inherit nodejs;
|
||||
|
||||
inherit dontStrip; # Stripping may fail a build for some package deployments
|
||||
inherit dontNpmInstall preRebuild unpackPhase buildPhase;
|
||||
|
||||
compositionScript = composePackage args;
|
||||
pinpointDependenciesScript = pinpointDependenciesOfPackage args;
|
||||
|
||||
passAsFile = [ "compositionScript" "pinpointDependenciesScript" ];
|
||||
|
||||
installPhase = ''
|
||||
# Create and enter a root node_modules/ folder
|
||||
mkdir -p $out/lib/node_modules
|
||||
cd $out/lib/node_modules
|
||||
|
||||
# Compose the package and all its dependencies
|
||||
source $compositionScriptPath
|
||||
|
||||
${prepareAndInvokeNPM { inherit packageName bypassCache reconstructLock npmFlags production; }}
|
||||
|
||||
# Create symlink to the deployed executable folder, if applicable
|
||||
if [ -d "$out/lib/node_modules/.bin" ]
|
||||
then
|
||||
ln -s $out/lib/node_modules/.bin $out/bin
|
||||
fi
|
||||
|
||||
# Create symlinks to the deployed manual page folders, if applicable
|
||||
if [ -d "$out/lib/node_modules/${packageName}/man" ]
|
||||
then
|
||||
mkdir -p $out/share
|
||||
for dir in "$out/lib/node_modules/${packageName}/man/"*
|
||||
do
|
||||
mkdir -p $out/share/man/$(basename "$dir")
|
||||
for page in "$dir"/*
|
||||
do
|
||||
ln -s $page $out/share/man/$(basename "$dir")
|
||||
done
|
||||
done
|
||||
fi
|
||||
|
||||
# Run post install hook, if provided
|
||||
runHook postInstall
|
||||
'';
|
||||
} // extraArgs);
|
||||
|
||||
# Builds a node environment (a node_modules folder and a set of binaries)
|
||||
buildNodeDependencies =
|
||||
{ name
|
||||
, packageName
|
||||
, version
|
||||
, src
|
||||
, dependencies ? []
|
||||
, buildInputs ? []
|
||||
, production ? true
|
||||
, npmFlags ? ""
|
||||
, dontNpmInstall ? false
|
||||
, bypassCache ? false
|
||||
, reconstructLock ? false
|
||||
, dontStrip ? true
|
||||
, unpackPhase ? "true"
|
||||
, buildPhase ? "true"
|
||||
, ... }@args:
|
||||
|
||||
let
|
||||
extraArgs = removeAttrs args [ "name" "dependencies" "buildInputs" ];
|
||||
in
|
||||
stdenv.mkDerivation ({
|
||||
name = "node-dependencies-${name}-${version}";
|
||||
|
||||
buildInputs = [ tarWrapper python nodejs ]
|
||||
++ lib.optional (stdenv.isLinux) utillinux
|
||||
++ lib.optional (stdenv.isDarwin) libtool
|
||||
++ buildInputs;
|
||||
|
||||
inherit dontStrip; # Stripping may fail a build for some package deployments
|
||||
inherit dontNpmInstall unpackPhase buildPhase;
|
||||
|
||||
includeScript = includeDependencies { inherit dependencies; };
|
||||
pinpointDependenciesScript = pinpointDependenciesOfPackage args;
|
||||
|
||||
passAsFile = [ "includeScript" "pinpointDependenciesScript" ];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/${packageName}
|
||||
cd $out/${packageName}
|
||||
|
||||
source $includeScriptPath
|
||||
|
||||
# Create fake package.json to make the npm commands work properly
|
||||
cp ${src}/package.json .
|
||||
chmod 644 package.json
|
||||
${lib.optionalString bypassCache ''
|
||||
if [ -f ${src}/package-lock.json ]
|
||||
then
|
||||
cp ${src}/package-lock.json .
|
||||
fi
|
||||
''}
|
||||
|
||||
# Go to the parent folder to make sure that all packages are pinpointed
|
||||
cd ..
|
||||
${lib.optionalString (builtins.substring 0 1 packageName == "@") "cd .."}
|
||||
|
||||
${prepareAndInvokeNPM { inherit packageName bypassCache reconstructLock npmFlags production; }}
|
||||
|
||||
# Expose the executables that were installed
|
||||
cd ..
|
||||
${lib.optionalString (builtins.substring 0 1 packageName == "@") "cd .."}
|
||||
|
||||
mv ${packageName} lib
|
||||
ln -s $out/lib/node_modules/.bin $out/bin
|
||||
'';
|
||||
} // extraArgs);
|
||||
|
||||
# Builds a development shell
|
||||
buildNodeShell =
|
||||
{ name
|
||||
, packageName
|
||||
, version
|
||||
, src
|
||||
, dependencies ? []
|
||||
, buildInputs ? []
|
||||
, production ? true
|
||||
, npmFlags ? ""
|
||||
, dontNpmInstall ? false
|
||||
, bypassCache ? false
|
||||
, reconstructLock ? false
|
||||
, dontStrip ? true
|
||||
, unpackPhase ? "true"
|
||||
, buildPhase ? "true"
|
||||
, ... }@args:
|
||||
|
||||
let
|
||||
nodeDependencies = buildNodeDependencies args;
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
name = "node-shell-${name}-${version}";
|
||||
|
||||
buildInputs = [ python nodejs ] ++ lib.optional (stdenv.isLinux) utillinux ++ buildInputs;
|
||||
buildCommand = ''
|
||||
mkdir -p $out/bin
|
||||
cat > $out/bin/shell <<EOF
|
||||
#! ${stdenv.shell} -e
|
||||
$shellHook
|
||||
exec ${stdenv.shell}
|
||||
EOF
|
||||
chmod +x $out/bin/shell
|
||||
'';
|
||||
|
||||
# Provide the dependencies in a development shell through the NODE_PATH environment variable
|
||||
inherit nodeDependencies;
|
||||
shellHook = lib.optionalString (dependencies != []) ''
|
||||
export NODE_PATH=${nodeDependencies}/lib/node_modules
|
||||
export PATH="${nodeDependencies}/bin:$PATH"
|
||||
'';
|
||||
};
|
||||
in
|
||||
{
|
||||
buildNodeSourceDist = lib.makeOverridable buildNodeSourceDist;
|
||||
buildNodePackage = lib.makeOverridable buildNodePackage;
|
||||
buildNodeDependencies = lib.makeOverridable buildNodeDependencies;
|
||||
buildNodeShell = lib.makeOverridable buildNodeShell;
|
||||
}
|
10290
pkgs/development/web/cypress/cypress-example-kitchensink/node-packages.nix
generated
Normal file
10290
pkgs/development/web/cypress/cypress-example-kitchensink/node-packages.nix
generated
Normal file
File diff suppressed because it is too large
Load diff
21
pkgs/development/web/cypress/cypress-example-kitchensink/regen-nix
Executable file
21
pkgs/development/web/cypress/cypress-example-kitchensink/regen-nix
Executable file
|
@ -0,0 +1,21 @@
|
|||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell ./regen-nix.nix
|
||||
#!nix-shell -i bash
|
||||
|
||||
node2nix \
|
||||
--nodejs-12 \
|
||||
--input $src/package.json \
|
||||
--lock $src/package-lock.json \
|
||||
--composition cypress-example-kitchensink.nix \
|
||||
--development \
|
||||
;
|
||||
|
||||
# node2nix produces opinionated expressions that work for in-repo packaging
|
||||
# but aren't ideal for Nixpkgs:
|
||||
sed -i cypress-example-kitchensink.nix \
|
||||
-e 's^fetchgit^fetchgit callPackage^'
|
||||
sed -i node-packages.nix \
|
||||
-e 's^fetchgit, ^fetchgit, callPackage, ^' \
|
||||
-e 's^src = .*/nix/store/.*-source^src = callPackage ./src.nix {}^' \
|
||||
-e 's^nix-gitignore.gitignoreSourcePure^(ignore: src: src)^' \
|
||||
;
|
|
@ -0,0 +1,8 @@
|
|||
{ pkgs ? import ../../../../.. { config = { }; overlays = [ ]; } }:
|
||||
|
||||
pkgs.mkShell {
|
||||
nativeBuildInputs = [
|
||||
pkgs.nodePackages.node2nix
|
||||
];
|
||||
src = pkgs.callPackage ./src.nix { };
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
{ fetchFromGitHub }: fetchFromGitHub {
|
||||
owner = "cypress-io";
|
||||
repo = "cypress-example-kitchensink";
|
||||
rev = "1572887a2003c2f35ff46d14f5f1cdfef975c9be";
|
||||
sha256 = "sha256-A7d95b9V707iOzlIg+3nItPPB8HNVVOjPhGqa8MXRPE=";
|
||||
}
|
|
@ -1,4 +1,19 @@
|
|||
{ stdenv, lib, fetchzip, autoPatchelfHook, xorg, gtk2, gnome2, gtk3, nss, alsa-lib, udev, unzip, wrapGAppsHook, mesa }:
|
||||
{ alsa-lib
|
||||
, autoPatchelfHook
|
||||
, callPackage
|
||||
, fetchzip
|
||||
, gnome2
|
||||
, gtk2
|
||||
, gtk3
|
||||
, lib
|
||||
, mesa
|
||||
, nss
|
||||
, stdenv
|
||||
, udev
|
||||
, unzip
|
||||
, wrapGAppsHook
|
||||
, xorg
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "cypress";
|
||||
|
@ -9,17 +24,22 @@ stdenv.mkDerivation rec {
|
|||
sha256 = "1mr46raha5aqi8ba0cqvyil5z4vcr46hnxqqmpk3fkrr8awd2897";
|
||||
};
|
||||
|
||||
passthru.updateScript = ./update.sh;
|
||||
|
||||
# don't remove runtime deps
|
||||
dontPatchELF = true;
|
||||
|
||||
nativeBuildInputs = [ autoPatchelfHook wrapGAppsHook unzip ];
|
||||
|
||||
buildInputs = with xorg; [
|
||||
libXScrnSaver libXdamage libXtst libxshmfence
|
||||
libXScrnSaver
|
||||
libXdamage
|
||||
libXtst
|
||||
libxshmfence
|
||||
] ++ [
|
||||
nss gtk2 alsa-lib gnome2.GConf gtk3
|
||||
nss
|
||||
gtk2
|
||||
alsa-lib
|
||||
gnome2.GConf
|
||||
gtk3
|
||||
mesa # for libgbm
|
||||
];
|
||||
|
||||
|
@ -41,11 +61,19 @@ stdenv.mkDerivation rec {
|
|||
runHook postInstall
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
updateScript = ./update.sh;
|
||||
|
||||
tests = {
|
||||
example = callPackage ./cypress-example-kitchensink { };
|
||||
};
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "Fast, easy and reliable testing for anything that runs in a browser";
|
||||
homepage = "https://www.cypress.io";
|
||||
license = licenses.mit;
|
||||
platforms = ["x86_64-linux"];
|
||||
platforms = [ "x86_64-linux" ];
|
||||
maintainers = with maintainers; [ tweber mmahut ];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -2,11 +2,11 @@
|
|||
|
||||
python3.pkgs.buildPythonApplication rec {
|
||||
pname = "flashfocus";
|
||||
version = "2.2.2";
|
||||
version = "2.2.3";
|
||||
|
||||
src = python3.pkgs.fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "1z20d596rnc7cs0rrd221gjn14dmbr11djv94y9p4v7rr788sswv";
|
||||
sha256 = "0cn44hryvz2wl7xklaslxsb3l2i3f8jkgmml0n9v2ks22j5l4r4h";
|
||||
};
|
||||
|
||||
nativeBuildInputs = with python3.pkgs; [
|
||||
|
|
|
@ -1979,6 +1979,8 @@ in
|
|||
|
||||
tensorflow-lite = callPackage ../development/libraries/science/math/tensorflow-lite { };
|
||||
|
||||
tezos-rust-libs = callPackage ../development/libraries/tezos-rust-libs { };
|
||||
|
||||
behdad-fonts = callPackage ../data/fonts/behdad-fonts { };
|
||||
|
||||
bfetch = callPackage ../tools/misc/bfetch { };
|
||||
|
|
|
@ -78,6 +78,8 @@ let
|
|||
|
||||
bitv = callPackage ../development/ocaml-modules/bitv { };
|
||||
|
||||
bls12-381 = callPackage ../development/ocaml-modules/bls12-381 { };
|
||||
|
||||
bolt = callPackage ../development/ocaml-modules/bolt { };
|
||||
|
||||
bos = callPackage ../development/ocaml-modules/bos { };
|
||||
|
@ -371,6 +373,8 @@ let
|
|||
|
||||
fdkaac = callPackage ../development/ocaml-modules/fdkaac { };
|
||||
|
||||
ff = callPackage ../development/ocaml-modules/ff { };
|
||||
|
||||
fiat-p256 = callPackage ../development/ocaml-modules/fiat-p256 { };
|
||||
|
||||
fieldslib_p4 = callPackage ../development/ocaml-modules/fieldslib { };
|
||||
|
@ -1159,6 +1163,18 @@ let
|
|||
|
||||
reason-native = lib.recurseIntoAttrs (callPackage ../development/ocaml-modules/reason-native { });
|
||||
|
||||
ezresto = callPackage ../development/ocaml-modules/resto/ezresto.nix { };
|
||||
ezresto-directory = callPackage ../development/ocaml-modules/resto/ezresto-directory.nix { };
|
||||
|
||||
resto = callPackage ../development/ocaml-modules/resto { };
|
||||
resto-acl = callPackage ../development/ocaml-modules/resto/acl.nix { };
|
||||
resto-cohttp = callPackage ../development/ocaml-modules/resto/cohttp.nix { };
|
||||
resto-cohttp-client = callPackage ../development/ocaml-modules/resto/cohttp-client.nix { };
|
||||
resto-cohttp-self-serving-client = callPackage ../development/ocaml-modules/resto/cohttp-self-serving-client.nix { };
|
||||
resto-cohttp-server = callPackage ../development/ocaml-modules/resto/cohttp-server.nix { };
|
||||
resto-directory = callPackage ../development/ocaml-modules/resto/directory.nix { };
|
||||
resto-json = callPackage ../development/ocaml-modules/resto/json.nix { };
|
||||
|
||||
rope = callPackage ../development/ocaml-modules/rope { };
|
||||
|
||||
routes = callPackage ../development/ocaml-modules/routes { };
|
||||
|
|
|
@ -4674,6 +4674,8 @@ in {
|
|||
|
||||
names = callPackage ../development/python-modules/names { };
|
||||
|
||||
nampa = callPackage ../development/python-modules/nampa { };
|
||||
|
||||
nanoleaf = callPackage ../development/python-modules/nanoleaf { };
|
||||
|
||||
nanomsg-python = callPackage ../development/python-modules/nanomsg-python {
|
||||
|
|
Loading…
Reference in a new issue