Merge master into haskell-updates

This commit is contained in:
github-actions[bot] 2023-09-14 00:12:11 +00:00 committed by GitHub
commit 40ffd5d79e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
26 changed files with 153 additions and 2816 deletions

View file

@ -301,6 +301,12 @@
githubId = 1174810;
name = "Nikolay Amiantov";
};
abdiramen = {
email = "abdirahman.osmanthus@gmail.com";
github = "Abdiramen";
githubId = 15805292;
name = "Abdirahman Osman";
};
abhi18av = {
email = "abhi18av@gmail.com";
github = "abhi18av";

View file

@ -662,6 +662,11 @@ in
];
};
# ZFS already has its own scheduler. Without this my(@Artturin) computer froze for a second when I nix build something.
services.udev.extraRules = ''
ACTION=="add|change", KERNEL=="sd[a-z]*[0-9]*|mmcblk[0-9]*p[0-9]*|nvme[0-9]*n[0-9]*p[0-9]*", ENV{ID_FS_TYPE}=="zfs_member", ATTR{../queue/scheduler}="none"
'';
environment.etc = genAttrs
(map
(file: "zfs/zed.d/${file}")

View file

@ -4,18 +4,20 @@
, autoreconfHook
, alsa-lib
, python3
, SDL
, SDL2
, libXext
, Cocoa
}:
stdenv.mkDerivation rec {
pname = "schismtracker";
version = "20220506";
version = "20230906";
src = fetchFromGitHub {
owner = pname;
repo = pname;
rev = version;
sha256 = "sha256-fK0FBn9e7l1Y/A7taFlaoas6ZPREFhEmskVBqjda6q0=";
sha256 = "sha256-eW1sqfcAR3lutSyQKj7j1elkFTa8jfZqgrJYYAzMlzo=";
};
configureFlags = [ "--enable-dependency-tracking" ]
@ -23,10 +25,18 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ autoreconfHook python3 ];
buildInputs = [ SDL ] ++ lib.optional stdenv.isLinux alsa-lib;
buildInputs = [ SDL2 ]
++ lib.optionals stdenv.isLinux [ alsa-lib libXext ]
++ lib.optionals stdenv.isDarwin [ Cocoa ];
enableParallelBuilding = true;
# Our Darwin SDL2 doesn't have a SDL2main to link against
preConfigure = lib.optionalString stdenv.isDarwin ''
substituteInPlace configure.ac \
--replace '-lSDL2main' '-lSDL2'
'';
meta = with lib; {
description = "Music tracker application, free reimplementation of Impulse Tracker";
homepage = "http://schismtracker.org/";

View file

@ -61,8 +61,8 @@ rec {
};
kops_1_27 = mkKops rec {
version = "1.27.0";
sha256 = "sha256-XJOdqOT/vMVXZmVasXRb+pdmWcSd6lsyQDCnZKyqrto=";
version = "1.27.1";
sha256 = "sha256-WV+0380yj8GHckY4PDM3WspbZ/YuYZOAQEMd2ygEOjo=";
rev = "v${version}";
};
}

View file

@ -55,7 +55,8 @@ stdenv.mkDerivation (finalAttrs: {
CC_BUILD = "${buildPackages.stdenv.cc}/bin/cc";
# The asm for armel is written with the 'asm' keyword.
CFLAGS = lib.optionalString stdenv.isAarch32 "-std=gnu99";
CFLAGS = lib.optionalString stdenv.isAarch32 "-std=gnu99"
+ lib.optionalString stdenv.hostPlatform.is32bit " -D_FILE_OFFSET_BITS=64";
enableParallelBuilding = true;

View file

@ -1,14 +1,14 @@
{ lib, stdenv, fetchFromGitHub, cmake }:
{ lib, stdenv, fetchFromGitHub, cmake, testers }:
stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "llhttp";
version = "9.1.0";
version = "9.1.2";
src = fetchFromGitHub {
owner = "nodejs";
repo = "llhttp";
rev = "release/v${version}";
hash = "sha256-DWRo9mVpmty/Ec+pKqPTZqwOlYJD+SmddwEui7P/694=";
rev = "release/v${finalAttrs.version}";
hash = "sha256-kW6u9ETZJcJBh150chfE3SEwFpT7evZ0cqz8caM7fbQ=";
};
nativeBuildInputs = [
@ -19,12 +19,17 @@ stdenv.mkDerivation rec {
"-DBUILD_STATIC_LIBS=ON"
];
passthru.tests.pkg-config = testers.hasPkgConfigModules {
package = finalAttrs.finalPackage;
};
meta = with lib; {
description = "Port of http_parser to llparse";
homepage = "https://llhttp.org/";
changelog = "https://github.com/nodejs/llhttp/releases/tag/${src.rev}";
changelog = "https://github.com/nodejs/llhttp/releases/tag/release/v${finalAttrs.version}";
license = licenses.mit;
pkgConfigModules = [ "libllhttp" ];
maintainers = [ maintainers.marsam ];
platforms = platforms.all;
};
}
})

View file

@ -108,6 +108,7 @@ mapAliases {
"@squoosh/cli" = throw "@squoosh/cli was removed because it was abandoned upstream"; # added 2023-09-02
ssb-server = throw "ssb-server was removed because it was broken"; # added 2023-08-21
stf = throw "stf was removed because it was broken"; # added 2023-08-21
inherit (pkgs) stylelint; # added 2023-09-13
surge = pkgs.surge-cli; # Added 2023-09-08
swagger = throw "swagger was removed because it was broken and abandoned upstream"; # added 2023-09-09
inherit (pkgs) terser; # Added 2023-08-31
@ -117,6 +118,7 @@ mapAliases {
triton = pkgs.triton; # Added 2023-05-06
typescript = pkgs.typescript; # Added 2023-06-21
inherit (pkgs) ungit; # added 2023-08-20
inherit (pkgs) vsc-leetcode-cli; # Added 2023-08-30
vscode-langservers-extracted = pkgs.vscode-langservers-extracted; # Added 2023-05-27
vue-cli = self."@vue/cli"; # added 2023-08-18
vue-language-server = self.vls; # added 2023-08-20

View file

@ -61,7 +61,6 @@
typescript-language-server = "typescript-language-server";
uglify-js = "uglifyjs";
undollar = "$";
vsc-leetcode-cli = "leetcode";
vscode-css-languageserver-bin = "css-languageserver";
vscode-html-languageserver-bin = "html-languageserver";
vscode-json-languageserver-bin = "json-languageserver";

View file

@ -160,7 +160,6 @@
, "katex"
, "keyoxide"
, "lcov-result-merger"
, "vsc-leetcode-cli"
, "lerna"
, "less"
, "less-plugin-clean-css"
@ -234,7 +233,6 @@
, "speed-test"
, "sql-formatter"
, "stackdriver-statsd-backend"
, "stylelint"
, "svelte-check"
, "svelte-language-server"
, "svgo"

View file

@ -94522,241 +94522,6 @@ in
bypassCache = true;
reconstructLock = true;
};
vsc-leetcode-cli = nodeEnv.buildNodePackage {
name = "vsc-leetcode-cli";
packageName = "vsc-leetcode-cli";
version = "2.8.1";
src = fetchurl {
url = "https://registry.npmjs.org/vsc-leetcode-cli/-/vsc-leetcode-cli-2.8.1.tgz";
sha512 = "C5q5wGeedHKJzs53/jrVWEeobRteB/libKrVHmLqE3zraKJBgteUN4LUNEYrAjU9O6yxgj/NPEWOLoEdRhwATw==";
};
dependencies = [
sources."abab-1.0.4"
sources."acorn-2.7.0"
sources."acorn-globals-1.0.9"
sources."ajv-6.12.6"
sources."ansi-regex-5.0.1"
sources."ansi-styles-3.2.1"
sources."asn1-0.2.6"
sources."assert-plus-1.0.0"
sources."async-1.5.2"
sources."asynckit-0.4.0"
sources."aws-sign2-0.7.0"
sources."aws4-1.12.0"
sources."balanced-match-1.0.2"
sources."bcrypt-pbkdf-1.0.2"
sources."boolbase-1.0.0"
sources."brace-expansion-1.1.11"
sources."camelcase-5.3.1"
sources."caseless-0.12.0"
sources."chalk-2.4.2"
sources."cheerio-0.20.0"
sources."cli-cursor-2.1.0"
sources."cli-spinners-1.3.1"
sources."cliui-7.0.4"
sources."clone-1.0.4"
sources."color-convert-1.9.3"
sources."color-name-1.1.3"
sources."colors-1.4.0"
sources."combined-stream-1.0.8"
sources."concat-map-0.0.1"
sources."core-util-is-1.0.3"
sources."css-select-1.2.0"
sources."css-what-2.1.3"
sources."cssom-0.3.8"
sources."cssstyle-0.2.37"
sources."cycle-1.0.3"
sources."dashdash-1.14.1"
sources."decamelize-1.2.0"
sources."deep-equal-0.2.2"
sources."deep-is-0.1.4"
sources."defaults-1.0.4"
sources."delayed-stream-1.0.0"
sources."dom-serializer-0.1.1"
sources."domelementtype-1.3.1"
sources."domhandler-2.3.0"
sources."domutils-1.5.1"
sources."ecc-jsbn-0.1.2"
sources."emoji-regex-8.0.0"
sources."entities-1.1.2"
sources."escalade-3.1.1"
sources."escape-string-regexp-1.0.5"
sources."escodegen-1.14.3"
sources."esprima-4.0.1"
sources."estraverse-4.3.0"
sources."esutils-2.0.3"
sources."extend-3.0.2"
sources."extsprintf-1.3.0"
sources."eyes-0.1.8"
sources."fast-deep-equal-3.1.3"
sources."fast-json-stable-stringify-2.1.0"
sources."fast-levenshtein-2.0.6"
sources."find-up-4.1.0"
sources."forever-agent-0.6.1"
sources."form-data-2.3.3"
sources."fs.realpath-1.0.0"
sources."get-caller-file-2.0.5"
sources."getpass-0.1.7"
sources."glob-7.2.3"
sources."har-schema-2.0.0"
sources."har-validator-5.1.5"
sources."has-flag-3.0.0"
sources."he-1.2.0"
(sources."htmlparser2-3.8.3" // {
dependencies = [
sources."entities-1.0.0"
];
})
sources."http-signature-1.2.0"
sources."i-0.3.7"
sources."inflight-1.0.6"
sources."inherits-2.0.4"
sources."ini-2.0.0"
sources."is-fullwidth-code-point-3.0.0"
sources."is-typedarray-1.0.0"
sources."isarray-0.0.1"
sources."isstream-0.1.2"
sources."jsbn-0.1.1"
sources."jsdom-7.2.2"
sources."json-schema-0.4.0"
sources."json-schema-traverse-0.4.1"
sources."json-stringify-safe-5.0.1"
sources."jsprim-1.4.2"
sources."levn-0.3.0"
sources."locate-path-5.0.0"
sources."lodash-4.17.21"
sources."log-symbols-2.2.0"
sources."mime-db-1.52.0"
sources."mime-types-2.1.35"
sources."mimic-fn-1.2.0"
sources."minimatch-3.1.2"
sources."minimist-1.2.8"
sources."mkdirp-1.0.4"
sources."moment-2.29.4"
sources."mute-stream-0.0.8"
(sources."nconf-0.11.4" // {
dependencies = [
sources."yargs-16.2.0"
];
})
sources."ncp-1.0.1"
sources."nth-check-1.0.2"
sources."nwmatcher-1.4.4"
sources."oauth-sign-0.9.0"
sources."once-1.4.0"
sources."onetime-2.0.1"
sources."optionator-0.8.3"
(sources."ora-3.0.0" // {
dependencies = [
sources."ansi-regex-3.0.1"
sources."strip-ansi-4.0.0"
];
})
sources."p-limit-2.3.0"
sources."p-locate-4.1.0"
sources."p-try-2.2.0"
sources."parse5-1.5.1"
sources."path-exists-4.0.0"
sources."path-is-absolute-1.0.1"
sources."performance-now-2.1.0"
sources."pkginfo-0.4.1"
sources."prelude-ls-1.1.2"
sources."prompt-1.0.0"
sources."psl-1.9.0"
sources."punycode-2.3.0"
sources."qs-6.5.3"
sources."read-1.0.7"
sources."readable-stream-1.1.14"
(sources."request-2.88.0" // {
dependencies = [
sources."punycode-1.4.1"
sources."tough-cookie-2.4.3"
];
})
sources."require-directory-2.1.1"
sources."require-main-filename-2.0.0"
sources."restore-cursor-2.0.0"
sources."revalidator-0.1.8"
sources."rimraf-2.7.1"
sources."safe-buffer-5.2.1"
sources."safer-buffer-2.1.2"
sources."sax-1.2.4"
sources."secure-keys-1.0.0"
sources."set-blocking-2.0.0"
sources."signal-exit-3.0.7"
sources."source-map-0.6.1"
sources."sshpk-1.17.0"
sources."stack-trace-0.0.10"
sources."string-width-4.2.3"
sources."string_decoder-0.10.31"
sources."strip-ansi-6.0.1"
sources."supports-color-5.5.0"
sources."symbol-tree-3.2.4"
sources."tough-cookie-2.5.0"
sources."tr46-0.0.3"
sources."tunnel-agent-0.6.0"
sources."tweetnacl-0.14.5"
sources."type-check-0.3.2"
sources."underscore-1.9.1"
sources."uri-js-4.4.1"
(sources."utile-0.3.0" // {
dependencies = [
sources."async-0.9.2"
sources."mkdirp-0.5.6"
];
})
sources."uuid-3.4.0"
(sources."verror-1.10.0" // {
dependencies = [
sources."core-util-is-1.0.2"
];
})
sources."wcwidth-1.0.1"
sources."webidl-conversions-2.0.1"
sources."whatwg-url-compat-0.6.5"
sources."which-module-2.0.1"
(sources."winston-2.1.1" // {
dependencies = [
sources."async-1.0.0"
sources."colors-1.0.3"
sources."pkginfo-0.3.1"
];
})
sources."word-wrap-1.2.5"
sources."wordwrap-1.0.0"
(sources."wrap-ansi-7.0.0" // {
dependencies = [
sources."ansi-styles-4.3.0"
sources."color-convert-2.0.1"
sources."color-name-1.1.4"
];
})
sources."wrappy-1.0.2"
sources."xml-name-validator-2.0.1"
sources."y18n-5.0.8"
(sources."yargs-15.4.1" // {
dependencies = [
sources."ansi-styles-4.3.0"
sources."cliui-6.0.0"
sources."color-convert-2.0.1"
sources."color-name-1.1.4"
sources."wrap-ansi-6.2.0"
sources."y18n-4.0.3"
sources."yargs-parser-18.1.3"
];
})
sources."yargs-parser-20.2.9"
];
buildInputs = globalBuildInputs;
meta = {
description = "A cli tool to enjoy leetcode!";
homepage = "https://github.com/leetcode-tools/leetcode-cli#readme";
license = "MIT";
};
production = true;
bypassCache = true;
reconstructLock = true;
};
lerna = nodeEnv.buildNodePackage {
name = "lerna";
packageName = "lerna";
@ -105377,208 +105142,6 @@ in
bypassCache = true;
reconstructLock = true;
};
stylelint = nodeEnv.buildNodePackage {
name = "stylelint";
packageName = "stylelint";
version = "15.10.3";
src = fetchurl {
url = "https://registry.npmjs.org/stylelint/-/stylelint-15.10.3.tgz";
sha512 = "aBQMMxYvFzJJwkmg+BUUg3YfPyeuCuKo2f+LOw7yYbU8AZMblibwzp9OV4srHVeQldxvSFdz0/Xu8blq2AesiA==";
};
dependencies = [
sources."@babel/code-frame-7.22.10"
sources."@babel/helper-validator-identifier-7.22.5"
sources."@babel/highlight-7.22.10"
sources."@csstools/css-parser-algorithms-2.3.1"
sources."@csstools/css-tokenizer-2.2.0"
sources."@csstools/media-query-list-parser-2.1.4"
sources."@csstools/selector-specificity-3.0.0"
sources."@nodelib/fs.scandir-2.1.5"
sources."@nodelib/fs.stat-2.0.5"
sources."@nodelib/fs.walk-1.2.8"
sources."@types/minimist-1.2.2"
sources."@types/normalize-package-data-2.4.1"
sources."ajv-8.12.0"
sources."ansi-regex-5.0.1"
sources."ansi-styles-3.2.1"
sources."argparse-2.0.1"
sources."array-union-2.1.0"
sources."arrify-1.0.1"
sources."astral-regex-2.0.0"
sources."balanced-match-2.0.0"
(sources."brace-expansion-1.1.11" // {
dependencies = [
sources."balanced-match-1.0.2"
];
})
sources."braces-3.0.2"
sources."callsites-3.1.0"
sources."camelcase-6.3.0"
sources."camelcase-keys-7.0.2"
sources."chalk-2.4.2"
sources."color-convert-1.9.3"
sources."color-name-1.1.3"
sources."colord-2.9.3"
sources."concat-map-0.0.1"
sources."cosmiconfig-8.2.0"
sources."css-functions-list-3.2.0"
sources."css-tree-2.3.1"
sources."cssesc-3.0.0"
sources."debug-4.3.4"
sources."decamelize-5.0.1"
(sources."decamelize-keys-1.1.1" // {
dependencies = [
sources."decamelize-1.2.0"
sources."map-obj-1.0.1"
];
})
sources."dir-glob-3.0.1"
sources."emoji-regex-8.0.0"
sources."error-ex-1.3.2"
sources."escape-string-regexp-1.0.5"
sources."fast-deep-equal-3.1.3"
sources."fast-glob-3.3.1"
sources."fastest-levenshtein-1.0.16"
sources."fastq-1.15.0"
sources."file-entry-cache-6.0.1"
sources."fill-range-7.0.1"
sources."find-up-5.0.0"
sources."flat-cache-3.0.4"
sources."flatted-3.2.7"
sources."fs.realpath-1.0.0"
sources."function-bind-1.1.1"
sources."glob-7.2.3"
sources."glob-parent-5.1.2"
sources."global-modules-2.0.0"
sources."global-prefix-3.0.0"
sources."globby-11.1.0"
sources."globjoin-0.1.4"
sources."hard-rejection-2.1.0"
sources."has-1.0.3"
sources."has-flag-3.0.0"
sources."hosted-git-info-4.1.0"
sources."html-tags-3.3.1"
sources."ignore-5.2.4"
(sources."import-fresh-3.3.0" // {
dependencies = [
sources."resolve-from-4.0.0"
];
})
sources."import-lazy-4.0.0"
sources."imurmurhash-0.1.4"
sources."indent-string-5.0.0"
sources."inflight-1.0.6"
sources."inherits-2.0.4"
sources."ini-1.3.8"
sources."is-arrayish-0.2.1"
sources."is-core-module-2.13.0"
sources."is-extglob-2.1.1"
sources."is-fullwidth-code-point-3.0.0"
sources."is-glob-4.0.3"
sources."is-number-7.0.0"
sources."is-plain-obj-1.1.0"
sources."is-plain-object-5.0.0"
sources."isexe-2.0.0"
sources."js-tokens-4.0.0"
sources."js-yaml-4.1.0"
sources."json-parse-even-better-errors-2.3.1"
sources."json-schema-traverse-1.0.0"
sources."kind-of-6.0.3"
sources."known-css-properties-0.28.0"
sources."lines-and-columns-1.2.4"
sources."locate-path-6.0.0"
sources."lodash.truncate-4.4.2"
sources."lru-cache-6.0.0"
sources."map-obj-4.3.0"
sources."mathml-tag-names-2.1.3"
sources."mdn-data-2.0.30"
sources."meow-10.1.5"
sources."merge2-1.4.1"
sources."micromatch-4.0.5"
sources."min-indent-1.0.1"
sources."minimatch-3.1.2"
sources."minimist-options-4.1.0"
sources."ms-2.1.2"
sources."nanoid-3.3.6"
sources."normalize-package-data-3.0.3"
sources."normalize-path-3.0.0"
sources."once-1.4.0"
sources."p-limit-3.1.0"
sources."p-locate-5.0.0"
sources."parent-module-1.0.1"
sources."parse-json-5.2.0"
sources."path-exists-4.0.0"
sources."path-is-absolute-1.0.1"
sources."path-type-4.0.0"
sources."picocolors-1.0.0"
sources."picomatch-2.3.1"
sources."postcss-8.4.28"
sources."postcss-resolve-nested-selector-0.1.1"
sources."postcss-safe-parser-6.0.0"
sources."postcss-selector-parser-6.0.13"
sources."postcss-value-parser-4.2.0"
sources."punycode-2.3.0"
sources."queue-microtask-1.2.3"
sources."quick-lru-5.1.1"
sources."read-pkg-6.0.0"
sources."read-pkg-up-8.0.0"
sources."redent-4.0.0"
sources."require-from-string-2.0.2"
sources."resolve-from-5.0.0"
sources."reusify-1.0.4"
sources."rimraf-3.0.2"
sources."run-parallel-1.2.0"
sources."semver-7.5.4"
sources."signal-exit-4.1.0"
sources."slash-3.0.0"
(sources."slice-ansi-4.0.0" // {
dependencies = [
sources."ansi-styles-4.3.0"
sources."color-convert-2.0.1"
sources."color-name-1.1.4"
];
})
sources."source-map-js-1.0.2"
sources."spdx-correct-3.2.0"
sources."spdx-exceptions-2.3.0"
sources."spdx-expression-parse-3.0.1"
sources."spdx-license-ids-3.0.13"
sources."string-width-4.2.3"
sources."strip-ansi-6.0.1"
sources."strip-indent-4.0.0"
sources."style-search-0.1.0"
sources."supports-color-5.5.0"
(sources."supports-hyperlinks-3.0.0" // {
dependencies = [
sources."has-flag-4.0.0"
sources."supports-color-7.2.0"
];
})
sources."svg-tags-1.0.0"
sources."table-6.8.1"
sources."to-regex-range-5.0.1"
sources."trim-newlines-4.1.1"
sources."type-fest-1.4.0"
sources."uri-js-4.4.1"
sources."util-deprecate-1.0.2"
sources."validate-npm-package-license-3.0.4"
sources."which-1.3.1"
sources."wrappy-1.0.2"
sources."write-file-atomic-5.0.1"
sources."yallist-4.0.0"
sources."yargs-parser-20.2.9"
sources."yocto-queue-0.1.0"
];
buildInputs = globalBuildInputs;
meta = {
description = "A mighty CSS linter that helps you avoid errors and enforce conventions.";
homepage = "https://stylelint.io";
license = "MIT";
};
production = true;
bypassCache = true;
reconstructLock = true;
};
svelte-check = nodeEnv.buildNodePackage {
name = "svelte-check";
packageName = "svelte-check";

View file

@ -14,14 +14,16 @@
buildPythonPackage rec {
pname = "amcrest";
version = "1.9.7";
disabled = pythonOlder "3.6";
version = "1.9.8";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "tchellomello";
repo = "python-amcrest";
rev = version;
hash = "sha256-An7MnGtZsmEZU/y6E0sivdexFD6HJRTB1juXqHfbDzE=";
rev = "refs/tags/${version}";
hash = "sha256-v0jWEZo06vltEq//suGrvJ/AeeDxUG5CCFhbf03q34w=";
};
propagatedBuildInputs = [
@ -38,11 +40,14 @@ buildPythonPackage rec {
responses
];
pythonImportsCheck = [ "amcrest" ];
pythonImportsCheck = [
"amcrest"
];
meta = with lib; {
description = "Python module for Amcrest and Dahua Cameras";
homepage = "https://github.com/tchellomello/python-amcrest";
changelog = "https://github.com/tchellomello/python-amcrest/releases/tag/${version}";
license = with licenses; [ gpl2Only ];
maintainers = with maintainers; [ fab ];
};

View file

@ -8,7 +8,7 @@
buildPythonPackage rec {
pname = "millheater";
version = "0.11.2";
version = "0.11.5";
format = "setuptools";
disabled = pythonOlder "3.10";
@ -17,7 +17,7 @@ buildPythonPackage rec {
owner = "Danielhiversen";
repo = "pymill";
rev = "refs/tags/${version}";
hash = "sha256-PsNT/mZ4Dun4s9QpGRyEuVxYcM5AXaUS28UsSOowOb4=";
hash = "sha256-rDEzMxXsbHvxAmPx1IFC5S8jG8LO8TNuNq/ISkdPWsU=";
};
propagatedBuildInputs = [

View file

@ -0,0 +1,24 @@
{ buildNpmPackage, fetchFromGitHub, lib }:
buildNpmPackage rec {
pname = "stylelint";
version = "15.10.3";
src = fetchFromGitHub {
owner = "stylelint";
repo = "stylelint";
rev = version;
hash = "sha256-k7Ngbd4Z3/JjCK6taynIiNCDTKfqGRrjfR0ePyRFY4w=";
};
npmDepsHash = "sha256-tVDhaDeUKzuyJU5ABSOeYgS56BDSJTfjBZdTsuL/7tA=";
dontNpmBuild = true;
meta = with lib; {
description = "Mighty CSS linter that helps you avoid errors and enforce conventions";
homepage = "https://stylelint.io";
license = licenses.mit;
maintainers = with maintainers; [ ];
};
}

View file

@ -11,7 +11,7 @@
}:
stdenvNoCC.mkDerivation rec {
version = "1.0.0";
version = "1.0.1";
pname = "bun";
src = passthru.sources.${stdenvNoCC.hostPlatform.system} or (throw "Unsupported system: ${stdenvNoCC.hostPlatform.system}");
@ -35,19 +35,19 @@ stdenvNoCC.mkDerivation rec {
sources = {
"aarch64-darwin" = fetchurl {
url = "https://github.com/oven-sh/bun/releases/download/bun-v${version}/bun-darwin-aarch64.zip";
hash = "sha256-Bd8KL1IbWBRiMZq4YPhNLdhBOqRReCFeUPAilLfk0TM=";
hash = "sha256-AzjCqfvR4Uad6+ocLo+KfqHKFjxOlZt4//Nw80FRijM=";
};
"aarch64-linux" = fetchurl {
url = "https://github.com/oven-sh/bun/releases/download/bun-v${version}/bun-linux-aarch64.zip";
hash = "sha256-CHOiQ47wXjkFyJG9ElE9gBpmWpylMEUf6c+Sm+YCpGc=";
hash = "sha256-EEcKoaaC0KnaAfUqd5QNYpTeArY3ia38l5dkZCooZuw=";
};
"x86_64-darwin" = fetchurl {
url = "https://github.com/oven-sh/bun/releases/download/bun-v${version}/bun-darwin-x64.zip";
hash = "sha256-0AT58hjawS60q5YAQd/upVz0vOIs11JM+lc3c1mGyOE=";
hash = "sha256-g4k0NdpWU1K+66Mi/idYAMx8pFLOBbUDk4rVczrxRjg=";
};
"x86_64-linux" = fetchurl {
url = "https://github.com/oven-sh/bun/releases/download/bun-v${version}/bun-linux-x64.zip";
hash = "sha256-1ju7ZuW82wRfXEiU24Lx9spCoIhhddJ2p4dTTQmsa7A=";
hash = "sha256-RmgnWTG6kTebYwIa/VAwvvJmbL+ARNC+HkbF4mJPF7o=";
};
};
updateScript = writeShellScript "update-bun" ''
@ -66,7 +66,7 @@ stdenvNoCC.mkDerivation rec {
};
meta = with lib; {
homepage = "https://bun.sh";
changelog = "https://bun.sh/blog/bun-v1.0"; # 1.0 changelog does not use the full version name, please change this to ${version} in the following releases
changelog = "https://bun.sh/blog/bun-v${version}";
description = "Incredibly fast JavaScript runtime, bundler, transpiler and package manager all in one";
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
longDescription = ''

View file

@ -81,7 +81,10 @@ in stdenv.mkDerivation rec {
'';
preFixup = ''
wrapProgram "$out/bin/insomnia" "''${gappsWrapperArgs[@]}" --prefix LD_LIBRARY_PATH : ${runtimeLibs}
wrapProgramShell "$out/bin/insomnia" \
"''${gappsWrapperArgs[@]}" \
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform=wayland --enable-features=WaylandWindowDecorations}}" \
--prefix LD_LIBRARY_PATH : ${runtimeLibs}
'';
meta = with lib; {

View file

@ -1,65 +1,39 @@
{ lib
, nixosTests
, stdenv
, buildNpmPackage
, fetchFromGitHub
, makeWrapper
, nodejs_18
, pkgs
}:
let
nodejs = nodejs_18;
in
stdenv.mkDerivation rec {
buildNpmPackage rec {
pname = "haste-server";
version = "b52b394bad909ddf151073987671e843540d91d6";
version = "unstable-2023-03-06";
src = fetchFromGitHub {
owner = "toptal";
repo = "haste-server";
rev = version;
rev = "b52b394bad909ddf151073987671e843540d91d6";
hash = "sha256-AVoz5MY5gNxQrHtDMPbQ85IjmHii1v6C2OXpEQj9zC8=";
};
nativeBuildInputs = [
nodejs
makeWrapper
];
npmDepsHash = "sha256-FEuqKbblAts0WTnGI9H9bRBOwPvkahltra1zl3sMPJs=";
installPhase =
let
nodeDependencies = ((import ./node-composition.nix {
inherit pkgs nodejs;
inherit (stdenv.hostPlatform) system;
}).nodeDependencies.override (old: {
# access to path '/nix/store/...-source' is forbidden in restricted mode
src = src;
dontNpmInstall = true;
}));
in
''
runHook postInstall
dontNpmBuild = true;
mkdir -p $out/share
cp -ra . $out/share/haste-server
ln -s ${nodeDependencies}/lib/node_modules $out/share/haste-server/node_modules
makeWrapper ${nodejs}/bin/node $out/bin/haste-server \
--add-flags $out/share/haste-server/server.js
runHook postBuild
'';
postInstall = ''
install -Dt "$out/share/haste-server" about.md
'';
passthru = {
tests = {
inherit (nixosTests) haste-server;
};
updateScript = ./update.sh;
};
meta = with lib; {
description = "open source pastebin written in node.js";
homepage = "https://www.toptal.com/developers/hastebin/about.md";
description = "Open source pastebin written in Node.js";
homepage = "https://github.com/toptal/haste-server";
license = licenses.mit;
mainProgram = "haste-server";
maintainers = with maintainers; [ mkg20001 ];
};
}

View file

@ -1,17 +0,0 @@
# This file has been generated by node2nix 1.11.1. Do not edit!
{pkgs ? import <nixpkgs> {
inherit system;
}, system ? builtins.currentSystem, nodejs ? pkgs."nodejs_14"}:
let
nodeEnv = import ./node-env.nix {
inherit (pkgs) stdenv lib python2 runCommand writeTextFile writeShellScript;
inherit pkgs nodejs;
libtool = if pkgs.stdenv.isDarwin then pkgs.darwin.cctools else null;
};
in
import ./node-deps.nix {
inherit (pkgs) fetchurl nix-gitignore stdenv lib fetchgit;
inherit nodeEnv;
}

File diff suppressed because it is too large Load diff

View file

@ -1,686 +0,0 @@
# This file originates from node2nix
{lib, stdenv, nodejs, python2, pkgs, libtool, runCommand, writeTextFile, writeShellScript}:
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
'';
};
# Common shell logic
installPackage = writeShellScript "install-package" ''
installPackage() {
local packageName=$1 src=$2
local strippedName
local 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
# Change to the package directory to install dependencies
cd "$DIR/$packageName"
}
'';
# Bundle the dependencies of the package
#
# Only include dependencies if they don't exist. They may also be bundled in the package.
includeDependencies = {dependencies}:
lib.optionalString (dependencies != []) (
''
mkdir -p node_modules
cd node_modules
''
+ (lib.concatMapStrings (dependency:
''
if [ ! -e "${dependency.packageName}" ]; then
${composePackage dependency}
fi
''
) dependencies)
+ ''
cd ..
''
);
# Recursively composes the dependencies of a package
composePackage = { name, packageName, src, dependencies ? [], ... }@args:
builtins.addErrorContext "while evaluating node package '${packageName}'" ''
installPackage "${packageName}" "${src}"
${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);
}
else {
packageObj.devDependencies = {};
}
replaceDependencies(packageObj.optionalDependencies);
replaceDependencies(packageObj.peerDependencies);
/* 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 = "reconstructpackagelock.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: 2,
requires: true,
packages: {
"": {
name: packageObj.name,
version: packageObj.version,
license: packageObj.license,
bin: packageObj.bin,
dependencies: packageObj.dependencies,
engines: packageObj.engines,
optionalDependencies: packageObj.optionalDependencies
}
},
dependencies: {}
};
function augmentPackageJSON(filePath, packages, dependencies) {
var packageJSON = path.join(filePath, "package.json");
if(fs.existsSync(packageJSON)) {
var packageObj = JSON.parse(fs.readFileSync(packageJSON));
packages[filePath] = {
version: packageObj.version,
integrity: "sha1-000000000000000000000000000=",
dependencies: packageObj.dependencies,
engines: packageObj.engines,
optionalDependencies: packageObj.optionalDependencies
};
dependencies[packageObj.name] = {
version: packageObj.version,
integrity: "sha1-000000000000000000000000000=",
dependencies: {}
};
processDependencies(path.join(filePath, "node_modules"), packages, dependencies[packageObj.name].dependencies);
}
}
function processDependencies(dir, packages, 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, packages, dependencies);
}
});
} else {
augmentPackageJSON(filePath, packages, dependencies);
}
}
});
}
}
processDependencies("node_modules", lockObj.packages, lockObj.dependencies);
fs.writeFileSync("package-lock.json", JSON.stringify(lockObj, null, 2));
'';
};
# Script that links bins defined in package.json to the node_modules bin directory
# NPM does not do this for top-level packages itself anymore as of v7
linkBinsScript = writeTextFile {
name = "linkbins.js";
text = ''
var fs = require('fs');
var path = require('path');
var packageObj = JSON.parse(fs.readFileSync("package.json"));
var nodeModules = Array(packageObj.name.split("/").length).fill("..").join(path.sep);
if(packageObj.bin !== undefined) {
fs.mkdirSync(path.join(nodeModules, ".bin"))
if(typeof packageObj.bin == "object") {
Object.keys(packageObj.bin).forEach(function(exe) {
if(fs.existsSync(packageObj.bin[exe])) {
console.log("linking bin '" + exe + "'");
fs.symlinkSync(
path.join("..", packageObj.name, packageObj.bin[exe]),
path.join(nodeModules, ".bin", exe)
);
}
else {
console.log("skipping non-existent bin '" + exe + "'");
}
})
}
else {
if(fs.existsSync(packageObj.bin)) {
console.log("linking bin '" + packageObj.bin + "'");
fs.symlinkSync(
path.join("..", packageObj.name, packageObj.bin),
path.join(nodeModules, ".bin", packageObj.name.split("/").pop())
);
}
else {
console.log("skipping non-existent bin '" + packageObj.bin + "'");
}
}
}
else if(packageObj.directories !== undefined && packageObj.directories.bin !== undefined) {
fs.mkdirSync(path.join(nodeModules, ".bin"))
fs.readdirSync(packageObj.directories.bin).forEach(function(exe) {
if(fs.existsSync(path.join(packageObj.directories.bin, exe))) {
console.log("linking bin '" + exe + "'");
fs.symlinkSync(
path.join("..", packageObj.name, packageObj.directories.bin, exe),
path.join(nodeModules, ".bin", exe)
);
}
else {
console.log("skipping non-existent bin '" + exe + "'");
}
})
}
'';
};
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
runHook postRebuild
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} --no-bin-links --ignore-scripts ${npmFlags} ${lib.optionalString production "--production"} install
fi
# Link executables defined in package.json
node ${linkBinsScript}
'';
# Builds and composes an NPM package including all its dependencies
buildNodePackage =
{ name
, packageName
, version ? null
, dependencies ? []
, buildInputs ? []
, production ? true
, npmFlags ? ""
, dontNpmInstall ? false
, bypassCache ? false
, reconstructLock ? false
, preRebuild ? ""
, dontStrip ? true
, unpackPhase ? "true"
, buildPhase ? "true"
, meta ? {}
, ... }@args:
let
extraArgs = removeAttrs args [ "name" "dependencies" "buildInputs" "dontStrip" "dontNpmInstall" "preRebuild" "unpackPhase" "buildPhase" "meta" ];
in
stdenv.mkDerivation ({
name = "${name}${if version == null then "" else "-${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 = ''
source ${installPackage}
# 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
# Patch the shebang lines of all the executables
ls $out/bin/* | while read i
do
file="$(readlink -f "$i")"
chmod u+rwx "$file"
patchShebangs "$file"
done
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
'';
meta = {
# default to Node.js' platforms
platforms = nodejs.meta.platforms;
} // meta;
} // extraArgs);
# Builds a node environment (a node_modules folder and a set of binaries)
buildNodeDependencies =
{ name
, packageName
, version ? null
, 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}${if version == null then "" else "-${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 = ''
source ${installPackage}
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 .
chmod 644 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 ? null
, src
, dependencies ? []
, buildInputs ? []
, production ? true
, npmFlags ? ""
, dontNpmInstall ? false
, bypassCache ? false
, reconstructLock ? false
, dontStrip ? true
, unpackPhase ? "true"
, buildPhase ? "true"
, ... }@args:
let
nodeDependencies = buildNodeDependencies args;
extraArgs = removeAttrs args [ "name" "dependencies" "buildInputs" "dontStrip" "dontNpmInstall" "unpackPhase" "buildPhase" ];
in
stdenv.mkDerivation ({
name = "node-shell-${name}${if version == null then "" else "-${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"
'';
} // extraArgs);
in
{
buildNodeSourceDist = lib.makeOverridable buildNodeSourceDist;
buildNodePackage = lib.makeOverridable buildNodePackage;
buildNodeDependencies = lib.makeOverridable buildNodeDependencies;
buildNodeShell = lib.makeOverridable buildNodeShell;
}

View file

@ -1,28 +0,0 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl common-updater-scripts nodePackages.node2nix gnused nix coreutils jq
set -euo pipefail
latestVersion="$(curl -s "https://api.github.com/repos/toptal/haste-server/commits?per_page=1" | jq -r ".[0].sha")"
currentVersion=$(nix-instantiate --eval -E "with import ./. {}; haste-server.version or (lib.getVersion haste-server)" | tr -d '"')
if [[ "$currentVersion" == "$latestVersion" ]]; then
echo "haste-server is up-to-date: $currentVersion"
exit 0
fi
update-source-version haste-server 0 sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=
update-source-version haste-server "$latestVersion"
# use patched source
store_src="$(nix-build . -A haste-server.src --no-out-link)"
cd "$(dirname "${BASH_SOURCE[0]}")"
node2nix \
--nodejs-14 \
--development \
--node-env ./node-env.nix \
--output ./node-deps.nix \
--input "$store_src/package.json" \
--composition ./node-composition.nix

View file

@ -1,16 +1,16 @@
{ lib, stdenv, fetchurl, jre, unzip, runtimeShell }:
let
major = "15";
minor = "0";
patch = "0";
in stdenv.mkDerivation rec {
stdenv.mkDerivation {
pname = "umlet";
version = "${major}.${minor}.${patch}";
version = "15.1.0";
src = fetchurl {
url = "https://www.umlet.com/umlet_${major}_${minor}/umlet-standalone-${version}.zip";
sha256 = "sha256-gdvhqYGyrFuQhhrkF26wXb3TQLRCLm59/uSxTPmHdAE=";
# NOTE: The download URL breaks consistency - sometimes w/ patch versions
# and sometimes w/o. Furthermore, for 15.1.0 they moved everything to the
# new /download subfolder.
# As releases are very rarely, just modify it by hand..
url = "https://www.umlet.com/download/umlet_15_1/umlet-standalone-15.1.zip";
hash = "sha256-M6oVWbOmPBTygS+TFkY9PWucFfYLD33suNUuWpFLMIo=";
};
nativeBuildInputs = [ unzip ];

View file

@ -0,0 +1,28 @@
{ buildNpmPackage
, fetchFromGitHub
, lib
}:
buildNpmPackage {
pname = "vsc-leetcode-cli";
version = "unstable-2021-04-11";
src = fetchFromGitHub {
owner = "leetcode-tools";
repo = "leetcode-cli";
rev = "c5f6b8987185ae9f181e138f999825516240f44c";
hash = "sha256-N8hQqIzCUYTT5RAd0eqNynSNkGiN4omFY+8QLBemIbs=";
};
npmDepsHash = "sha256-t8eEnyAKeDmbmduUXuxo/WbJTced5dLeJTbtjxrrxY8=";
dontNpmBuild = true;
meta = with lib; {
description = "A CLI tool for leetcode.com";
homepage = "https://github.com/leetcode-tools/leetcode-cli";
license = licenses.mit;
maintainers = with maintainers; [ cpcloud ];
mainProgram = "leetcode";
};
}

View file

@ -2,7 +2,7 @@
buildGoModule rec {
pname = "snowflake";
version = "2.5.1";
version = "2.6.1";
src = fetchFromGitLab {
domain = "gitlab.torproject.org";
@ -10,16 +10,16 @@ buildGoModule rec {
owner = "anti-censorship/pluggable-transports";
repo = "snowflake";
rev = "v${version}";
sha256 = "sha256-r2NRIb6qbA1B5HlVNRqa9ongQpyiyPskhembPHX3Lgc=";
sha256 = "sha256-3gLcSZv8GpEio+yvPyBVVceb1nO0HzhpQKhEgf4nQvU=";
};
vendorHash = "sha256-dnfm4KiVD89bnHV7bfw5aXWHGdcH9JBdrtvuS6s8N5w=";
vendorHash = "sha256-MjxDB9fcPM6nIeGk6YvJOKXI/ThlMrxqJl9ROAREwXk=";
meta = with lib; {
description = "System to defeat internet censorship";
homepage = "https://snowflake.torproject.org/";
changelog = "https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake/-/raw/v${version}/ChangeLog";
maintainers = with maintainers; [ lourkeur ];
maintainers = with maintainers; [ lourkeur yayayayaka ];
license = licenses.bsd3;
};
}

View file

@ -6,13 +6,13 @@
stdenv.mkDerivation rec {
pname = "exploitdb";
version = "2023-09-12";
version = "2023-09-13";
src = fetchFromGitLab {
owner = "exploit-database";
repo = pname;
rev = "refs/tags/${version}";
hash = "sha256-XMOXBlCld1YXymRMOMIeQgszn8L6rMCZWPHlLtIAlRg=";
hash = "sha256-Dv7LcKzZi5uvEiYmFk/lrOd1l1VknCvjz7cV3K2UfeM=";
};
nativeBuildInputs = [

View file

@ -5,16 +5,16 @@
rustPlatform.buildRustPackage rec {
pname = "steamguard-cli";
version = "0.12.0";
version = "0.12.1";
src = fetchFromGitHub {
owner = "dyc3";
repo = pname;
rev = "v${version}";
hash = "sha256-WCEMZTi9/EI8JaUM5w2xJkx0x3DoaByORgVqw1TPcgI=";
hash = "sha256-i+q8hiElLuA1oHRLASiO/icEmhd1VqvV/zKGV0CSXms=";
};
cargoHash = "sha256-FVjL0tFndJNsL5oZSSqBvMtCEPqzf5xZGd8NaV5nmr4=";
cargoHash = "sha256-1K482GygV9SLpbpwF1iI3pwL0gcNo0eM2goKTgscK64=";
meta = with lib; {
changelog = "https://github.com/dyc3/steamguard-cli/releases/tag/v${version}";

View file

@ -20361,6 +20361,8 @@ with pkgs;
strace-analyzer = callPackage ../development/tools/misc/strace-analyzer { };
stylelint = callPackage ../development/tools/analysis/stylelint { };
stylua = callPackage ../development/tools/stylua { };
summon = callPackage ../development/tools/summon { };
@ -30755,7 +30757,9 @@ with pkgs;
ptcollab = libsForQt5.callPackage ../applications/audio/ptcollab { };
schismtracker = callPackage ../applications/audio/schismtracker { };
schismtracker = callPackage ../applications/audio/schismtracker {
inherit (darwin.apple_sdk.frameworks) Cocoa;
};
jnetmap = callPackage ../applications/networking/jnetmap { };
@ -41561,6 +41565,8 @@ with pkgs;
inherit (gst_all_1) gstreamer gst-plugins-base gst-plugins-good gst-plugins-bad gst-plugins-ugly;
};
vsc-leetcode-cli = callPackage ../tools/misc/vsc-leetcode-cli { };
vsh = callPackage ../tools/misc/vsh { };
vttest = callPackage ../tools/misc/vttest { };