├── .envrc ├── files.nix ├── .checkignore ├── pkgs ├── electron │ ├── electron_4_0_4 │ │ └── default.nix │ ├── electron_3_0_0-beta_5 │ │ └── default.nix │ └── mkElectronPkg.nix ├── nodejs │ ├── nodejs_9_10_1 │ │ └── default.nix │ ├── nodejs_10_13_0 │ │ └── default.nix │ ├── nodejs_10_14_1 │ │ └── default.nix │ ├── nodejs_10_14_2 │ │ └── default.nix │ ├── nodejs_10_15_0 │ │ └── default.nix │ ├── nodejs_10_15_1 │ │ └── default.nix │ ├── nodejs_10_15_3 │ │ └── default.nix │ ├── nodejs_10_19_0 │ │ └── default.nix │ ├── nodejs_12_14_1 │ │ └── default.nix │ ├── nodejs_12_16_0 │ │ └── default.nix │ └── nodejs_12_16_2 │ │ └── default.nix ├── purescript │ ├── purescript_0_12_2 │ │ └── default.nix │ ├── purescript_0_12_3 │ │ └── default.nix │ ├── purescript_0_12_4 │ │ └── default.nix │ ├── purescript_0_12_1 │ │ └── default.nix │ ├── purescript_0_12_5 │ │ └── default.nix │ ├── purescript_0_13_0 │ │ └── default.nix │ └── mkPurescriptPkg.nix ├── yarn │ ├── yarn_1_21_1 │ │ └── default.nix │ ├── yarn_1_22_0 │ │ └── default.nix │ ├── yarn_1_22_4 │ │ └── default.nix │ ├── yarn_1_12_3 │ │ └── default.nix │ └── yarn_1_16_0 │ │ └── default.nix └── default.nix ├── format.nix ├── default.nix ├── sources.nix ├── release.nix ├── lint.nix ├── shell.nix ├── .github └── workflows │ ├── check.yaml │ └── build.yaml ├── sources.json └── Readme.md /.envrc: -------------------------------------------------------------------------------- 1 | eval "$(lorri direnv)" -------------------------------------------------------------------------------- /files.nix: -------------------------------------------------------------------------------- 1 | "$(find . -name '*.nix' $(printf '! -path %s ' $(cat .checkignore)))" 2 | -------------------------------------------------------------------------------- /.checkignore: -------------------------------------------------------------------------------- 1 | ./pkgs/purescript/spago_0_7_5_0/default.nix 2 | ./pkgs/purescript/spago_0_7_2_0/default.nix 3 | -------------------------------------------------------------------------------- /pkgs/electron/electron_4_0_4/default.nix: -------------------------------------------------------------------------------- 1 | import ../mkElectronPkg.nix { 2 | version = "4.0.4"; 3 | sha256 = "08kalbzvdrqa93wqvs64cpd6y5msahsiqnl0ycj2n3sckw11fxl7"; 4 | } 5 | -------------------------------------------------------------------------------- /pkgs/electron/electron_3_0_0-beta_5/default.nix: -------------------------------------------------------------------------------- 1 | import ../mkElectronPkg.nix { 2 | version = "3.0.0-beta.5"; 3 | sha256 = "17gvdc2iq9cik4qca9zp8mlkg4h4y3m081fj43x6shgzzkmvvhbb"; 4 | } 5 | -------------------------------------------------------------------------------- /format.nix: -------------------------------------------------------------------------------- 1 | { nixpkgs ? (import ./sources.nix).nixpkgs 2 | }: 3 | let 4 | files = import ./files.nix; 5 | pkgs = import nixpkgs { overlays = [ ]; }; 6 | in 7 | pkgs.writeShellScriptBin "format" "${pkgs.nixpkgs-fmt}/bin/nixpkgs-fmt $@ ${files}" 8 | -------------------------------------------------------------------------------- /pkgs/nodejs/nodejs_9_10_1/default.nix: -------------------------------------------------------------------------------- 1 | { callPackage, nixpkgs }: 2 | let 3 | buildNodejs = callPackage "${nixpkgs}/pkgs/development/web/nodejs/nodejs.nix" { }; 4 | in 5 | buildNodejs { 6 | version = "9.10.1"; 7 | sha256 = "1widvxbc8sp8p8vp7q38b3zy0w1nx4iaqmp81s6bvaqs08h7wfy9"; 8 | } 9 | -------------------------------------------------------------------------------- /pkgs/nodejs/nodejs_10_13_0/default.nix: -------------------------------------------------------------------------------- 1 | { callPackage, nixpkgs }: 2 | let 3 | buildNodejs = callPackage "${nixpkgs}/pkgs/development/web/nodejs/nodejs.nix" { }; 4 | in 5 | buildNodejs { 6 | version = "10.13.0"; 7 | sha256 = "0hg6z89lczjs4cc8ljqqdy4h1n5ccwclniyyj2651yr81imck04d"; 8 | } 9 | -------------------------------------------------------------------------------- /pkgs/nodejs/nodejs_10_14_1/default.nix: -------------------------------------------------------------------------------- 1 | { callPackage, nixpkgs }: 2 | let 3 | buildNodejs = callPackage "${nixpkgs}/pkgs/development/web/nodejs/nodejs.nix" { }; 4 | in 5 | buildNodejs { 6 | version = "10.14.1"; 7 | sha256 = "0d5hg8hf4c1sshh77a6hy944bzm3q3ipqggbyim61q3r2szngvrx"; 8 | } 9 | -------------------------------------------------------------------------------- /pkgs/nodejs/nodejs_10_14_2/default.nix: -------------------------------------------------------------------------------- 1 | { callPackage, nixpkgs }: 2 | let 3 | buildNodejs = callPackage "${nixpkgs}/pkgs/development/web/nodejs/nodejs.nix" { }; 4 | in 5 | buildNodejs { 6 | version = "10.14.2"; 7 | sha256 = "1lxcjl7q59zp3hp6gri6gg2d717x1694h1wczgmlv3yawdayq6mf"; 8 | } 9 | -------------------------------------------------------------------------------- /pkgs/nodejs/nodejs_10_15_0/default.nix: -------------------------------------------------------------------------------- 1 | { callPackage, nixpkgs }: 2 | let 3 | buildNodejs = callPackage "${nixpkgs}/pkgs/development/web/nodejs/nodejs.nix" { }; 4 | in 5 | buildNodejs { 6 | version = "10.15.0"; 7 | sha256 = "0gnygq4n7aar4jrynnnslxhlrlrml9f1n9passvj2fxqfi6b6ykr"; 8 | } 9 | -------------------------------------------------------------------------------- /pkgs/nodejs/nodejs_10_15_1/default.nix: -------------------------------------------------------------------------------- 1 | { callPackage, nixpkgs }: 2 | let 3 | buildNodejs = callPackage "${nixpkgs}/pkgs/development/web/nodejs/nodejs.nix" { }; 4 | in 5 | buildNodejs { 6 | version = "10.15.1"; 7 | sha256 = "0n68c4zjakdj6yzdc9fbrn0wghyslkya9sz1v6122i40zfwzfm8s"; 8 | } 9 | -------------------------------------------------------------------------------- /pkgs/nodejs/nodejs_10_15_3/default.nix: -------------------------------------------------------------------------------- 1 | { callPackage, nixpkgs }: 2 | let 3 | buildNodejs = callPackage "${nixpkgs}/pkgs/development/web/nodejs/nodejs.nix" { }; 4 | in 5 | buildNodejs { 6 | version = "10.15.3"; 7 | sha256 = "1mcijznh481s44i59p571a38bfvcxm9f8x2l0l1005aly0kdj8jf"; 8 | } 9 | -------------------------------------------------------------------------------- /pkgs/nodejs/nodejs_10_19_0/default.nix: -------------------------------------------------------------------------------- 1 | { callPackage, nixpkgs }: 2 | let 3 | buildNodejs = callPackage "${nixpkgs}/pkgs/development/web/nodejs/nodejs.nix" { }; 4 | in 5 | buildNodejs { 6 | version = "10.19.0"; 7 | sha256 = "0sginvcsf7lrlzsnpahj4bj1f673wfvby8kaxgvzlrbb7sy229v2"; 8 | } 9 | -------------------------------------------------------------------------------- /pkgs/purescript/purescript_0_12_2/default.nix: -------------------------------------------------------------------------------- 1 | { haskell }: 2 | 3 | haskell.packages.ghc844.callPackage 4 | ( 5 | import ../mkPurescriptPkg.nix { 6 | version = "0.12.2"; 7 | sha256 = "1y7bcfj6fdlwmisdd75xcdkz7grch0pcmb9xsh6zwyvi6c40a3g2"; 8 | } 9 | ) 10 | { } 11 | -------------------------------------------------------------------------------- /pkgs/purescript/purescript_0_12_3/default.nix: -------------------------------------------------------------------------------- 1 | { haskell }: 2 | 3 | haskell.packages.ghc844.callPackage 4 | ( 5 | import ../mkPurescriptPkg.nix { 6 | version = "0.12.3"; 7 | sha256 = "0h4216x80cgqdvl7l0glw9xxhnpakh8272p65yc2d5zwbvvfra6k"; 8 | } 9 | ) 10 | { } 11 | -------------------------------------------------------------------------------- /pkgs/purescript/purescript_0_12_4/default.nix: -------------------------------------------------------------------------------- 1 | { haskell }: 2 | 3 | haskell.packages.ghc864.callPackage 4 | ( 5 | import ../mkPurescriptPkg.nix { 6 | version = "0.12.4"; 7 | sha256 = "1lkicclh9gm3lwgi2vl7qqa2vzf763rw06m79mr1j291z4h2ym76"; 8 | } 9 | ) 10 | { } 11 | -------------------------------------------------------------------------------- /pkgs/purescript/purescript_0_12_1/default.nix: -------------------------------------------------------------------------------- 1 | { haskell }: 2 | 3 | haskell.packages.ghc844.callPackage 4 | ( 5 | import ../mkPurescriptPkg.nix { 6 | version = "0.12.1"; 7 | sha256 = "81ab67e994a85e4ee455d35a5023b5ee2f191c83e9de2be65a8cd2892e302454"; 8 | } 9 | ) 10 | { } 11 | -------------------------------------------------------------------------------- /pkgs/nodejs/nodejs_12_14_1/default.nix: -------------------------------------------------------------------------------- 1 | { callPackage, nixpkgs, icu66 }: 2 | let 3 | buildNodejs = callPackage "${nixpkgs}/pkgs/development/web/nodejs/nodejs.nix" { icu = icu66; }; 4 | in 5 | buildNodejs { 6 | version = "12.14.1"; 7 | sha256 = "1nvsivl496fgaypbk2pqqh7py29g7wsggyjlqydy1c0q4f24nyw7"; 8 | } 9 | -------------------------------------------------------------------------------- /pkgs/nodejs/nodejs_12_16_0/default.nix: -------------------------------------------------------------------------------- 1 | { callPackage, nixpkgs, icu66 }: 2 | let 3 | buildNodejs = callPackage "${nixpkgs}/pkgs/development/web/nodejs/nodejs.nix" { icu = icu66; }; 4 | in 5 | buildNodejs { 6 | version = "12.16.0"; 7 | sha256 = "09grij355z210mkzkzarb6gwz8b02lnaxzdll1249kiz8wvhdjdq"; 8 | } 9 | -------------------------------------------------------------------------------- /pkgs/nodejs/nodejs_12_16_2/default.nix: -------------------------------------------------------------------------------- 1 | { callPackage, nixpkgs, icu66 }: 2 | let 3 | buildNodejs = callPackage "${nixpkgs}/pkgs/development/web/nodejs/nodejs.nix" { icu = icu66; }; 4 | in 5 | buildNodejs { 6 | version = "12.16.2"; 7 | sha256 = "0y5yd6h13fr34byi7h5xdjaivgcxiz0ykcmpk9nm5ra01b54fp2m"; 8 | } 9 | -------------------------------------------------------------------------------- /default.nix: -------------------------------------------------------------------------------- 1 | { nixpkgs ? , versions }: _: super: 2 | let 3 | pkgs = super.callPackage ./pkgs { inherit nixpkgs; }; 4 | normalizeVersion = builtins.replaceStrings [ "." ] [ "_" ]; 5 | getPackage = pkg: version: pkgs."${pkg}_${normalizeVersion version}"; 6 | in 7 | super.lib.mapAttrs getPackage versions 8 | -------------------------------------------------------------------------------- /sources.nix: -------------------------------------------------------------------------------- 1 | let 2 | nivSrc = fetchTarball { 3 | url = "https://github.com/nmattia/niv/tarball/2ecfd86b631714b457e56d70dd83fa60435baeb6"; 4 | sha256 = "01j6727cws8blg1npp54b4w6xa0gpgyzhyws2vqgp8clnlnmqqhi"; 5 | }; 6 | sources = import "${nivSrc}/nix/sources.nix" { 7 | sourcesFile = ./sources.json; 8 | }; 9 | niv = import nivSrc { }; 10 | in 11 | niv // sources 12 | -------------------------------------------------------------------------------- /release.nix: -------------------------------------------------------------------------------- 1 | { nodejs ? null 2 | , yarn ? null 3 | }: 4 | let 5 | versions = 6 | if nodejs == null 7 | then { inherit yarn; } 8 | else 9 | if yarn == null 10 | then { inherit nodejs; } 11 | else { inherit nodejs yarn; }; 12 | nixjs = import (./.) { inherit versions; }; 13 | pkgs = import { overlays = [ nixjs ]; }; 14 | in 15 | map (pkg: pkgs."${pkg}") (builtins.attrNames versions) 16 | -------------------------------------------------------------------------------- /lint.nix: -------------------------------------------------------------------------------- 1 | let 2 | sources = import ./sources.nix; 3 | in 4 | { nix-linter ? sources.nix-linter 5 | , nixpkgs ? sources.nixpkgs 6 | }: 7 | let 8 | nix-linter-overlay = self: _: { 9 | nix-linter = (self.callPackage nix-linter { }).nix-linter; 10 | }; 11 | 12 | files = import ./files.nix; 13 | 14 | pkgs = import nixpkgs { 15 | overlays = [ 16 | nix-linter-overlay 17 | ]; 18 | }; 19 | in 20 | pkgs.writeShellScriptBin "lint" "${pkgs.nix-linter}/bin/nix-linter $@ ${files}" 21 | -------------------------------------------------------------------------------- /shell.nix: -------------------------------------------------------------------------------- 1 | let 2 | sources = import ./sources.nix; 3 | in 4 | { nixpkgs ? sources.nixpkgs 5 | , niv ? sources.niv 6 | }: 7 | let 8 | niv-overlay = self: _: { 9 | niv = self.symlinkJoin { 10 | name = "niv"; 11 | paths = [ niv ]; 12 | buildInputs = [ self.makeWrapper ]; 13 | postBuild = '' 14 | wrapProgram $out/bin/niv \ 15 | --add-flags "--sources-file ${toString ./sources.json}" 16 | ''; 17 | }; 18 | }; 19 | 20 | pkgs = import nixpkgs { 21 | overlays = [ 22 | niv-overlay 23 | ]; 24 | }; 25 | 26 | lint = import ./lint.nix { inherit nixpkgs; }; 27 | format = import ./format.nix { inherit nixpkgs; }; 28 | in 29 | pkgs.mkShell { 30 | buildInputs = [ 31 | pkgs.niv 32 | lint 33 | format 34 | ]; 35 | } 36 | -------------------------------------------------------------------------------- /pkgs/yarn/yarn_1_21_1/default.nix: -------------------------------------------------------------------------------- 1 | { stdenv, nodejs }: 2 | 3 | stdenv.mkDerivation rec { 4 | name = "yarn-${version}"; 5 | version = "1.21.1"; 6 | 7 | src = fetchTarball { 8 | url = "https://github.com/yarnpkg/yarn/releases/download/v${version}/yarn-v${version}.tar.gz"; 9 | sha256 = "1yw3v62a6309f9hr189870i9jw2a15pkians1nnfjqczzh7r5pih"; 10 | }; 11 | 12 | buildInputs = [ nodejs ]; 13 | 14 | installPhase = '' 15 | mkdir -p $out/{bin,libexec/yarn/} 16 | cp -R . $out/libexec/yarn 17 | ln -s $out/libexec/yarn/bin/yarn.js $out/bin/yarn 18 | ln -s $out/libexec/yarn/bin/yarn.js $out/bin/yarnpkg 19 | ''; 20 | 21 | meta = with stdenv.lib; { 22 | homepage = https://yarnpkg.com/; 23 | description = "Fast, reliable, and secure dependency management for javascript"; 24 | license = licenses.bsd2; 25 | maintainers = [ maintainers.offline ]; 26 | }; 27 | } 28 | -------------------------------------------------------------------------------- /pkgs/yarn/yarn_1_22_0/default.nix: -------------------------------------------------------------------------------- 1 | { stdenv, nodejs }: 2 | 3 | stdenv.mkDerivation rec { 4 | name = "yarn-${version}"; 5 | version = "1.22.0"; 6 | 7 | src = fetchTarball { 8 | url = "https://github.com/yarnpkg/yarn/releases/download/v${version}/yarn-v${version}.tar.gz"; 9 | sha256 = "0hbsdbrqx5xhr171ik862v51xwjzbfncic92pgbnhnlmxy2y974x"; 10 | }; 11 | 12 | buildInputs = [ nodejs ]; 13 | 14 | installPhase = '' 15 | mkdir -p $out/{bin,libexec/yarn/} 16 | cp -R . $out/libexec/yarn 17 | ln -s $out/libexec/yarn/bin/yarn.js $out/bin/yarn 18 | ln -s $out/libexec/yarn/bin/yarn.js $out/bin/yarnpkg 19 | ''; 20 | 21 | meta = with stdenv.lib; { 22 | homepage = https://yarnpkg.com/; 23 | description = "Fast, reliable, and secure dependency management for javascript"; 24 | license = licenses.bsd2; 25 | maintainers = [ maintainers.offline ]; 26 | }; 27 | } 28 | -------------------------------------------------------------------------------- /pkgs/yarn/yarn_1_22_4/default.nix: -------------------------------------------------------------------------------- 1 | { stdenv, nodejs }: 2 | 3 | stdenv.mkDerivation rec { 4 | name = "yarn-${version}"; 5 | version = "1.22.4"; 6 | 7 | src = fetchTarball { 8 | url = "https://github.com/yarnpkg/yarn/releases/download/v${version}/yarn-v${version}.tar.gz"; 9 | sha256 = "1s054c9cmlmzy6cfkawhaxvaxhqcq0a17n4sb12p0bp2lzkax9lm"; 10 | }; 11 | 12 | buildInputs = [ nodejs ]; 13 | 14 | installPhase = '' 15 | mkdir -p $out/{bin,libexec/yarn/} 16 | cp -R . $out/libexec/yarn 17 | ln -s $out/libexec/yarn/bin/yarn.js $out/bin/yarn 18 | ln -s $out/libexec/yarn/bin/yarn.js $out/bin/yarnpkg 19 | ''; 20 | 21 | meta = with stdenv.lib; { 22 | homepage = https://yarnpkg.com/; 23 | description = "Fast, reliable, and secure dependency management for javascript"; 24 | license = licenses.bsd2; 25 | maintainers = [ maintainers.offline ]; 26 | }; 27 | } 28 | -------------------------------------------------------------------------------- /pkgs/yarn/yarn_1_12_3/default.nix: -------------------------------------------------------------------------------- 1 | { stdenv, nodejs, fetchzip }: 2 | 3 | stdenv.mkDerivation rec { 4 | name = "yarn-${version}"; 5 | version = "1.12.3"; 6 | 7 | src = fetchzip { 8 | url = "https://github.com/yarnpkg/yarn/releases/download/v${version}/yarn-v${version}.tar.gz"; 9 | sha256 = "0izn7lfvfw046qlxdgiiiyqj24sl2yclm6v8bzy8ilsr00csbrm2"; 10 | }; 11 | 12 | buildInputs = [ nodejs ]; 13 | 14 | installPhase = '' 15 | mkdir -p $out/{bin,libexec/yarn/} 16 | cp -R . $out/libexec/yarn 17 | ln -s $out/libexec/yarn/bin/yarn.js $out/bin/yarn 18 | ln -s $out/libexec/yarn/bin/yarn.js $out/bin/yarnpkg 19 | ''; 20 | 21 | meta = with stdenv.lib; { 22 | homepage = https://yarnpkg.com/; 23 | description = "Fast, reliable, and secure dependency management for javascript"; 24 | license = licenses.bsd2; 25 | maintainers = [ maintainers.offline ]; 26 | }; 27 | } 28 | -------------------------------------------------------------------------------- /pkgs/yarn/yarn_1_16_0/default.nix: -------------------------------------------------------------------------------- 1 | { stdenv, nodejs, fetchzip }: 2 | 3 | stdenv.mkDerivation rec { 4 | name = "yarn-${version}"; 5 | version = "1.16.0"; 6 | 7 | src = fetchzip { 8 | url = "https://github.com/yarnpkg/yarn/releases/download/v${version}/yarn-v${version}.tar.gz"; 9 | sha256 = "1ki518ppw7bka4bfgvsv9s8x785vy23nvi7ihsw6ivisrg5v0w7w"; 10 | }; 11 | 12 | buildInputs = [ nodejs ]; 13 | 14 | installPhase = '' 15 | mkdir -p $out/{bin,libexec/yarn/} 16 | cp -R . $out/libexec/yarn 17 | ln -s $out/libexec/yarn/bin/yarn.js $out/bin/yarn 18 | ln -s $out/libexec/yarn/bin/yarn.js $out/bin/yarnpkg 19 | ''; 20 | 21 | meta = with stdenv.lib; { 22 | homepage = https://yarnpkg.com/; 23 | description = "Fast, reliable, and secure dependency management for javascript"; 24 | license = licenses.bsd2; 25 | maintainers = [ maintainers.offline ]; 26 | }; 27 | } 28 | -------------------------------------------------------------------------------- /.github/workflows/check.yaml: -------------------------------------------------------------------------------- 1 | name: Check 2 | 3 | on: 4 | pull_request: 5 | push: 6 | branches: 7 | - master 8 | - release-20.09 9 | 10 | jobs: 11 | lint: 12 | runs-on: ubuntu-latest 13 | steps: 14 | 15 | - name: Check out codebase 16 | uses: actions/checkout@v2 17 | 18 | - name: Install nix 19 | uses: cachix/install-nix-action@v12 20 | with: 21 | nix_path: nixpkgs=channel:nixos-20.09 22 | 23 | - name: Set up cachix 24 | uses: cachix/cachix-action@v8 25 | with: 26 | name: nix-linter 27 | skipPush: true 28 | 29 | - name: Install packages 30 | run: nix-build lint.nix 31 | 32 | - name: Run lint 33 | run: ./result/bin/lint 34 | 35 | format: 36 | runs-on: ubuntu-latest 37 | steps: 38 | 39 | - name: Check out codebase 40 | uses: actions/checkout@v2 41 | 42 | - name: Install nix 43 | uses: cachix/install-nix-action@v12 44 | with: 45 | nix_path: nixpkgs=channel:nixos-20.09 46 | 47 | - name: Install packages 48 | run: nix-build format.nix 49 | 50 | - name: Check formatting 51 | run: ./result/bin/format --check 52 | -------------------------------------------------------------------------------- /pkgs/electron/mkElectronPkg.nix: -------------------------------------------------------------------------------- 1 | { version, sha256 }: { stdenv, libXScrnSaver, makeWrapper, fetchurl, unzip, atomEnv, gtk2, at-spi2-atk }: 2 | 3 | stdenv.mkDerivation rec { 4 | inherit version; 5 | 6 | name = "electron-${version}"; 7 | 8 | meta = with stdenv.lib; { 9 | description = "Cross platform desktop application shell"; 10 | homepage = https://github.com/electron/electron; 11 | license = licenses.mit; 12 | platforms = [ "x86_64-linux" ]; 13 | }; 14 | 15 | src = fetchurl { 16 | inherit sha256; 17 | 18 | url = "https://github.com/electron/electron/releases/download/v${version}/electron-v${version}-linux-x64.zip"; 19 | }; 20 | 21 | buildInputs = [ unzip makeWrapper ]; 22 | 23 | buildCommand = '' 24 | mkdir -p $out/lib/electron $out/bin 25 | unzip -d $out/lib/electron $src 26 | ln -s $out/lib/electron/electron $out/bin 27 | fixupPhase 28 | patchelf \ 29 | --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ 30 | --set-rpath "${atomEnv.libPath}:${gtk2}/lib:${at-spi2-atk}/lib:$out/lib/electron" \ 31 | $out/lib/electron/electron 32 | wrapProgram $out/lib/electron/electron \ 33 | --prefix LD_PRELOAD : ${stdenv.lib.makeLibraryPath [ libXScrnSaver ]}/libXss.so.1 34 | ''; 35 | } 36 | -------------------------------------------------------------------------------- /pkgs/purescript/purescript_0_12_5/default.nix: -------------------------------------------------------------------------------- 1 | { haskell }: 2 | let 3 | ghc = haskell.packages.ghc864; 4 | networkPkg = 5 | { mkDerivation 6 | , base 7 | , bytestring 8 | , deepseq 9 | , directory 10 | , hspec 11 | , hspec-discover 12 | , HUnit 13 | , stdenv 14 | }: 15 | mkDerivation { 16 | pname = "network"; 17 | version = "3.0.1.1"; 18 | sha256 = "d2bc064ea56c14275ff755800c3dd033ad6092fb24ad1783f9ec10c70bdd4cf5"; 19 | libraryHaskellDepends = [ base bytestring deepseq ]; 20 | testHaskellDepends = [ base bytestring directory hspec HUnit ]; 21 | testToolDepends = [ hspec-discover ]; 22 | homepage = "https://github.com/haskell/network"; 23 | description = "Low-level networking interface"; 24 | license = stdenv.lib.licenses.bsd3; 25 | }; 26 | purescriptPkg = import ../mkPurescriptPkg.nix { 27 | version = "0.12.5"; 28 | sha256 = "0dpn0v510lgzd9zqglqan4m8l7bf891psqmih147pnrmigmiaa39"; 29 | }; 30 | packages = ghc.override { 31 | overrides = haskellPackagesNew: _: rec { 32 | network = haskellPackagesNew.callPackage networkPkg { }; 33 | purescript = haskellPackagesNew.callPackage purescriptPkg { }; 34 | }; 35 | }; 36 | in 37 | packages.purescript 38 | -------------------------------------------------------------------------------- /sources.json: -------------------------------------------------------------------------------- 1 | { 2 | "nix-linter": { 3 | "branch": "master", 4 | "description": "Linter for the Nix expression language", 5 | "homepage": "", 6 | "owner": "Synthetica9", 7 | "repo": "nix-linter", 8 | "rev": "2516a8cda41f9bb553a1c3eca38e3dd94ebf53de", 9 | "sha256": "07mn2c9v67wsm57jlxv9pqac9hahw4618vngmj2sfbgihx8997kb", 10 | "type": "tarball", 11 | "url": "https://github.com/Synthetica9/nix-linter/archive/2516a8cda41f9bb553a1c3eca38e3dd94ebf53de.tar.gz", 12 | "url_template": "https://github.com///archive/.tar.gz" 13 | }, 14 | "nixpkgs": { 15 | "branch": "nixos-20.09", 16 | "description": "A read-only mirror of NixOS/nixpkgs tracking the released channels. Send issues and PRs to", 17 | "homepage": "https://github.com/NixOS/nixpkgs", 18 | "owner": "NixOS", 19 | "repo": "nixpkgs", 20 | "rev": "1ae46bffe4a7cceae2f9c7ac629c3774369b7772", 21 | "sha256": "1ri1s3rkr0h6qir473syv8n6y9jgvhxhj6n7qca1ma4kc81v5cwx", 22 | "type": "tarball", 23 | "url": "https://github.com/NixOS/nixpkgs/archive/1ae46bffe4a7cceae2f9c7ac629c3774369b7772.tar.gz", 24 | "url_template": "https://github.com///archive/.tar.gz" 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /pkgs/purescript/purescript_0_13_0/default.nix: -------------------------------------------------------------------------------- 1 | { haskell }: 2 | let 3 | ghc = haskell.packages.ghc864; 4 | networkPkg = 5 | { mkDerivation 6 | , base 7 | , bytestring 8 | , deepseq 9 | , directory 10 | , hspec 11 | , hspec-discover 12 | , HUnit 13 | , stdenv 14 | }: 15 | mkDerivation { 16 | pname = "network"; 17 | version = "3.0.1.1"; 18 | sha256 = "d2bc064ea56c14275ff755800c3dd033ad6092fb24ad1783f9ec10c70bdd4cf5"; 19 | libraryHaskellDepends = [ base bytestring deepseq ]; 20 | testHaskellDepends = [ base bytestring directory hspec HUnit ]; 21 | testToolDepends = [ hspec-discover ]; 22 | homepage = "https://github.com/haskell/network"; 23 | description = "Low-level networking interface"; 24 | license = stdenv.lib.licenses.bsd3; 25 | }; 26 | purescriptPkg = import ../mkPurescriptPkg.nix { 27 | version = "0.13.0"; 28 | sha256 = "1cpdbb48a8qs57adc37qkcfaszj3m6gds6gdq07iq11b6gmfzr3q"; 29 | extraDepends = [ packages.happy ]; 30 | }; 31 | packages = ghc.override { 32 | overrides = haskellPackagesNew: _: rec { 33 | network = haskellPackagesNew.callPackage networkPkg { }; 34 | purescript = haskellPackagesNew.callPackage purescriptPkg { }; 35 | }; 36 | }; 37 | in 38 | packages.purescript 39 | -------------------------------------------------------------------------------- /.github/workflows/build.yaml: -------------------------------------------------------------------------------- 1 | name: Build 2 | 3 | on: 4 | pull_request: 5 | push: 6 | branches: 7 | - master 8 | - release-20.09 9 | schedule: 10 | - cron: '0 * * * *' 11 | 12 | jobs: 13 | build: 14 | runs-on: ubuntu-latest 15 | steps: 16 | 17 | - name: Check out codebase 18 | uses: actions/checkout@v2 19 | 20 | - name: Install nix 21 | uses: cachix/install-nix-action@v12 22 | with: 23 | nix_path: nixpkgs=channel:nixos-20.09 24 | 25 | - name: Set up cachix 26 | uses: cachix/cachix-action@v8 27 | with: 28 | name: nixjs 29 | signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}' 30 | 31 | - name: Build packages 32 | run: | 33 | nix-build release.nix \ 34 | --argstr nodejs ${{ matrix.nodejs }} \ 35 | --argstr yarn ${{ matrix.yarn }} 36 | 37 | strategy: 38 | matrix: 39 | yarn: 40 | - 1.12.3 41 | - 1.16.0 42 | - 1.21.1 43 | - 1.22.0 44 | - 1.22.4 45 | nodejs: 46 | - 9.10.1 47 | - 10.13.0 48 | - 10.14.1 49 | - 10.14.2 50 | - 10.15.0 51 | - 10.15.1 52 | - 10.15.3 53 | - 10.19.0 54 | - 12.14.1 55 | - 12.16.0 56 | - 12.16.2 57 | -------------------------------------------------------------------------------- /pkgs/default.nix: -------------------------------------------------------------------------------- 1 | { callPackage, nixpkgs }: 2 | 3 | { 4 | electron_3_0_0-beta_5 = callPackage ./electron/electron_3_0_0-beta_5 { }; 5 | electron_4_0_4 = callPackage ./electron/electron_4_0_4 { }; 6 | 7 | nodejs_9_10_1 = callPackage ./nodejs/nodejs_9_10_1 { inherit nixpkgs; }; 8 | nodejs_10_13_0 = callPackage ./nodejs/nodejs_10_13_0 { inherit nixpkgs; }; 9 | nodejs_10_14_1 = callPackage ./nodejs/nodejs_10_14_1 { inherit nixpkgs; }; 10 | nodejs_10_14_2 = callPackage ./nodejs/nodejs_10_14_2 { inherit nixpkgs; }; 11 | nodejs_10_15_0 = callPackage ./nodejs/nodejs_10_15_0 { inherit nixpkgs; }; 12 | nodejs_10_15_1 = callPackage ./nodejs/nodejs_10_15_1 { inherit nixpkgs; }; 13 | nodejs_10_15_3 = callPackage ./nodejs/nodejs_10_15_3 { inherit nixpkgs; }; 14 | nodejs_10_19_0 = callPackage ./nodejs/nodejs_10_19_0 { inherit nixpkgs; }; 15 | nodejs_12_14_1 = callPackage ./nodejs/nodejs_12_14_1 { inherit nixpkgs; }; 16 | nodejs_12_16_0 = callPackage ./nodejs/nodejs_12_16_0 { inherit nixpkgs; }; 17 | nodejs_12_16_2 = callPackage ./nodejs/nodejs_12_16_2 { inherit nixpkgs; }; 18 | 19 | purescript_0_12_1 = callPackage ./purescript/purescript_0_12_1 { }; 20 | purescript_0_12_2 = callPackage ./purescript/purescript_0_12_2 { }; 21 | purescript_0_12_3 = callPackage ./purescript/purescript_0_12_3 { }; 22 | purescript_0_12_4 = callPackage ./purescript/purescript_0_12_4 { }; 23 | purescript_0_12_5 = callPackage ./purescript/purescript_0_12_5 { }; 24 | purescript_0_13_0 = callPackage ./purescript/purescript_0_13_0 { }; 25 | 26 | spago_0_7_2_0 = callPackage ./purescript/spago_0_7_2_0 { }; 27 | spago_0_7_5_0 = callPackage ./purescript/spago_0_7_5_0 { }; 28 | 29 | yarn_1_12_3 = callPackage ./yarn/yarn_1_12_3 { }; 30 | yarn_1_16_0 = callPackage ./yarn/yarn_1_16_0 { }; 31 | yarn_1_21_1 = callPackage ./yarn/yarn_1_21_1 { }; 32 | yarn_1_22_0 = callPackage ./yarn/yarn_1_22_0 { }; 33 | yarn_1_22_4 = callPackage ./yarn/yarn_1_22_4 { }; 34 | yarn_2_0_0-rc_27 = callPackage ./yarn/yarn_2_0_0-rc_27 { }; 35 | } 36 | -------------------------------------------------------------------------------- /Readme.md: -------------------------------------------------------------------------------- 1 | # nixjs 2 | 3 | This repository contains nix packages for various versions of javascript tools 4 | and associated libraries. It is indended for development on javascript projects 5 | where being precise about your tooling versioning is important. To see a 6 | complete list of available packages, take a look in 7 | [pkgs/default.nix](pkgs/default.nix). 8 | 9 | ## Usage 10 | 11 | It is recommended to consume this package set as an overlay. To create the 12 | overlay, simply `import` the default module and pass it a set containing keys 13 | for the package names you want, and values which are the versions you want. For 14 | instance, to pull in purescript and a specific node and yarn version, you could 15 | use the following `shell.nix`: 16 | 17 | ```nix 18 | { 19 | nodejs ? "12.16.2", 20 | yarn ? "1.22.4", 21 | nixjs ? fetchTarball "https://github.com/cprussin/nixjs/tarball/release-20.03", 22 | nixpkgs ? 23 | }: 24 | 25 | let 26 | nixjs-overlay = import nixjs { 27 | inherit nixpkgs; 28 | versions = { 29 | inherit nodejs yarn; 30 | }; 31 | }; 32 | pkgs = import nixpkgs { overlays = [ nixjs-overlay ]; }; 33 | in 34 | 35 | pkgs.mkShell { 36 | buildInputs = [ pkgs.nodejs pkgs.yarn ]; 37 | } 38 | ``` 39 | 40 | ## Binary Cache 41 | 42 | - **Cache URL**: `https://nixjs.cachix.org` 43 | - **Public Key**: `nixjs.cachix.org-1:3v2zgxvA0y7kmoD1/oIXfVRnDWZA+F3ysfT9TbBBg/E=` 44 | 45 | There is a [binary cache at cachix](https://app.cachix.org/cache/nixjs) that you 46 | can use. Not all combinations are pre-built, but if you're using relatively 47 | modern versions you shouldn't have to build. 48 | 49 | To set up the cache, you can use the cachix client: 50 | 51 | ```bash 52 | cachix use nixjs 53 | ``` 54 | 55 | Alternatively, you can add the appropriate options to `nix.conf` manually: 56 | 57 | ``` 58 | substituters = https://nixjs.cachix.org 59 | trusted-public-keys = nixjs.cachix.org-1:3v2zgxvA0y7kmoD1/oIXfVRnDWZA+F3ysfT9TbBBg/E= 60 | ``` 61 | 62 | Or with in your NixOS `configuration.nix`: 63 | 64 | ```nix 65 | { ... }: 66 | 67 | { 68 | nix = { 69 | binaryCaches = [ "https://nixjs.cachix.org" ]; 70 | binaryCachePublicKeys = [ "nixjs.cachix.org-1:3v2zgxvA0y7kmoD1/oIXfVRnDWZA+F3ysfT9TbBBg/E=" ]; 71 | }; 72 | } 73 | ``` 74 | 75 | ## Contributing 76 | 77 | This repository is open to contributions! We welcome the following packages in 78 | this repository: 79 | 80 | - All versions of nodejs 81 | - Javascript ecosystem tools that are generally not installed via node package 82 | managers, such as the package managers themselves (yarn, pnpm, etc.) 83 | - Portions of tooling for languages that compile to javascript that aren't 84 | generally installed through node package managers (for instance, the 85 | purescript compiler) 86 | - Versions of system libraries necessary to support any of the above that aren't 87 | in nixpkgs or aren't reliable in nixpkgs 88 | 89 | Things we would prefer not to have in this package set: 90 | 91 | - Node modules / bower components. There are better tools out there that do a 92 | more holistic job at solving nix packaging for these portions of the 93 | ecosystem, such as `node2nix` and `bower2nix`. This includes things like 94 | `psc` for purescript or `bower` itself, which are best installed through a 95 | node package manager. 96 | - Versions of system libraries that are available and supported in nixpkgs. 97 | -------------------------------------------------------------------------------- /pkgs/purescript/mkPurescriptPkg.nix: -------------------------------------------------------------------------------- 1 | { version, sha256, extraDepends ? [ ] }: 2 | { mkDerivation 3 | , aeson 4 | , aeson-better-errors 5 | , ansi-terminal 6 | , ansi-wl-pprint 7 | , base 8 | , base-compat 9 | , blaze-html 10 | , bower-json 11 | , boxes 12 | , bytestring 13 | , Cabal 14 | , cheapskate 15 | , clock 16 | , containers 17 | , data-ordlist 18 | , deepseq 19 | , directory 20 | , dlist 21 | , edit-distance 22 | , file-embed 23 | , filepath 24 | , fsnotify 25 | , gitrev 26 | , Glob 27 | , haskeline 28 | , hspec 29 | , hspec-discover 30 | , http-types 31 | , HUnit 32 | , language-javascript 33 | , lifted-base 34 | , microlens-platform 35 | , monad-control 36 | , monad-logger 37 | , mtl 38 | , network 39 | , optparse-applicative 40 | , parallel 41 | , parsec 42 | , pattern-arrows 43 | , process 44 | , protolude 45 | , regex-tdfa 46 | , safe 47 | , scientific 48 | , semigroups 49 | , sourcemap 50 | , split 51 | , stdenv 52 | , stm 53 | , stringsearch 54 | , syb 55 | , tasty 56 | , tasty-hspec 57 | , text 58 | , time 59 | , transformers 60 | , transformers-base 61 | , transformers-compat 62 | , unordered-containers 63 | , utf8-string 64 | , vector 65 | , wai 66 | , wai-websockets 67 | , warp 68 | , websockets 69 | }: 70 | mkDerivation { 71 | inherit version sha256; 72 | 73 | pname = "purescript"; 74 | isLibrary = true; 75 | isExecutable = true; 76 | libraryHaskellDepends = [ 77 | aeson 78 | aeson-better-errors 79 | ansi-terminal 80 | base 81 | base-compat 82 | blaze-html 83 | bower-json 84 | boxes 85 | bytestring 86 | Cabal 87 | cheapskate 88 | clock 89 | containers 90 | data-ordlist 91 | deepseq 92 | directory 93 | dlist 94 | edit-distance 95 | file-embed 96 | filepath 97 | fsnotify 98 | Glob 99 | haskeline 100 | language-javascript 101 | lifted-base 102 | microlens-platform 103 | monad-control 104 | monad-logger 105 | mtl 106 | parallel 107 | parsec 108 | pattern-arrows 109 | process 110 | protolude 111 | regex-tdfa 112 | safe 113 | scientific 114 | semigroups 115 | sourcemap 116 | split 117 | stm 118 | stringsearch 119 | syb 120 | text 121 | time 122 | transformers 123 | transformers-base 124 | transformers-compat 125 | unordered-containers 126 | utf8-string 127 | vector 128 | ] ++ extraDepends; 129 | executableHaskellDepends = [ 130 | aeson 131 | aeson-better-errors 132 | ansi-terminal 133 | ansi-wl-pprint 134 | base 135 | base-compat 136 | blaze-html 137 | bower-json 138 | boxes 139 | bytestring 140 | Cabal 141 | cheapskate 142 | clock 143 | containers 144 | data-ordlist 145 | deepseq 146 | directory 147 | dlist 148 | edit-distance 149 | file-embed 150 | filepath 151 | fsnotify 152 | gitrev 153 | Glob 154 | haskeline 155 | http-types 156 | language-javascript 157 | lifted-base 158 | microlens-platform 159 | monad-control 160 | monad-logger 161 | mtl 162 | network 163 | optparse-applicative 164 | parallel 165 | parsec 166 | pattern-arrows 167 | process 168 | protolude 169 | regex-tdfa 170 | safe 171 | scientific 172 | semigroups 173 | sourcemap 174 | split 175 | stm 176 | stringsearch 177 | syb 178 | text 179 | time 180 | transformers 181 | transformers-base 182 | transformers-compat 183 | unordered-containers 184 | utf8-string 185 | vector 186 | wai 187 | wai-websockets 188 | warp 189 | websockets 190 | ] ++ extraDepends; 191 | testHaskellDepends = [ 192 | aeson 193 | aeson-better-errors 194 | ansi-terminal 195 | base 196 | base-compat 197 | blaze-html 198 | bower-json 199 | boxes 200 | bytestring 201 | Cabal 202 | cheapskate 203 | clock 204 | containers 205 | data-ordlist 206 | deepseq 207 | directory 208 | dlist 209 | edit-distance 210 | file-embed 211 | filepath 212 | fsnotify 213 | Glob 214 | haskeline 215 | hspec 216 | hspec-discover 217 | HUnit 218 | language-javascript 219 | lifted-base 220 | microlens-platform 221 | monad-control 222 | monad-logger 223 | mtl 224 | parallel 225 | parsec 226 | pattern-arrows 227 | process 228 | protolude 229 | regex-tdfa 230 | safe 231 | scientific 232 | semigroups 233 | sourcemap 234 | split 235 | stm 236 | stringsearch 237 | syb 238 | tasty 239 | tasty-hspec 240 | text 241 | time 242 | transformers 243 | transformers-base 244 | transformers-compat 245 | unordered-containers 246 | utf8-string 247 | vector 248 | ] ++ extraDepends; 249 | testToolDepends = [ hspec-discover ]; 250 | doCheck = false; 251 | homepage = "http://www.purescript.org/"; 252 | description = "PureScript Programming Language Compiler"; 253 | license = stdenv.lib.licenses.bsd3; 254 | } 255 | --------------------------------------------------------------------------------