├── LICENSE ├── README.md ├── asus-ux32ln-r4031h.nix ├── backup-notebook.nix ├── bind.nix ├── crosvm ├── crosvm-runner ├── crosvm-runner.nix ├── minimal-rc.lisp ├── rootfs.nix └── rust-9p.nix ├── custom-vim.nix ├── demos ├── ipv6.sh ├── local-packages.nix ├── local-packages.sh └── xelatex.sh ├── fat-initramfs ├── assemble-disk-image.sh ├── create-fat32.sh ├── create-grub-config.sh ├── create-root-image.sh ├── fat-initramfs.nix ├── grub-print-entry.sh ├── grub-print-header.sh ├── modprobe.conf ├── stage-2-template.nix ├── test-caller.nix └── use-from-nixos.nix ├── filesystems-asus-n53j.nix ├── filesystems-asus-ux32ln.nix ├── filesystems-main.nix ├── fonts.nix ├── gb-bxi7-4770r ├── configuration.nix ├── hardware-configuration.nix └── nixpkgs-config.nix ├── httpd.nix ├── init-less-system ├── generic │ ├── build-derivation-in-chroot.sh │ ├── create-nix-users.sh │ ├── deploy-grub-via-chroot.sh │ ├── deploy-nix-to-chroot.sh │ ├── grub-print-entry.sh │ ├── grub-print-header.sh │ ├── nix.nix │ ├── pam.nix │ ├── pseudo-system.nix │ ├── services.nix │ └── tools.nix └── my │ ├── mount-partitions-thinkpad.sh │ ├── mount-partitions-usb.sh │ ├── mount-partitions.sh │ ├── pseudo-system-thinkpad-rebuild.sh │ └── pseudo-system-thinkpad.nix ├── initrd-to-read-boot ├── create-efi-entry.sh ├── hello.c ├── initrd.nix ├── mini-udev.sh ├── pseudo-system-rebuild.sh ├── pseudo-system.nix ├── services.nix ├── sync-nix-store.sh ├── system-setup.sh ├── tools.nix └── unpack-initrd.sh ├── kernel-config ├── kernel-options.nix ├── lang-os ├── LICENSE ├── README.md ├── assemble-grub-config.sh ├── back-to-initrd.sh ├── build-user-shell-binary.sh ├── bus-wrappers.nix ├── c │ ├── file-lock.c │ ├── in-pty.c │ ├── lock-vt-test.c │ ├── numeric-su.c │ ├── pty.c │ ├── simulate-setid.c │ └── vtlock.c ├── fat-initramfs.nix ├── firefox-profile.nix ├── grub-print-entry.sh ├── grub-print-header.sh ├── lisp-os-helpers.nix ├── lisp-os-helpers │ ├── auth-data.lisp │ ├── daemon.lisp │ ├── fbterm-requests.lisp │ ├── ffi.lisp │ ├── file-locks.lisp │ ├── global-sqlite.lisp │ ├── kernel.lisp │ ├── lisp-os-helpers.asd │ ├── marionette.lisp │ ├── network.lisp │ ├── nix.lisp │ ├── plain-web.lisp │ ├── read-eval-print-once.lisp │ ├── references.lisp │ ├── safe-read.lisp │ ├── shell.lisp │ ├── socket-command-client.lisp │ ├── socket-command-definitions.lisp │ ├── socket-command-server.lisp │ ├── sound.lisp │ ├── subuser-x.lisp │ ├── subuser.lisp │ ├── timestamp.lisp │ ├── unix-users.lisp │ ├── user-abbreviations.lisp │ ├── util.lisp │ └── vt.lisp ├── lisp-server-helpers.nix ├── lisp-server-helpers │ ├── auth-data.lisp │ ├── daemon.lisp │ ├── fbterm-requests.lisp │ ├── file-locks.lisp │ ├── global-sqlite.lisp │ ├── network.lisp │ ├── nix.lisp │ ├── references.lisp │ ├── safe-read.lisp │ ├── server-helpers.asd │ ├── shell.lisp │ ├── socket-command-client.lisp │ ├── socket-command-server.lisp │ ├── subuser.lisp │ ├── timestamp.lisp │ ├── unix-users.lisp │ └── vt.lisp ├── local │ ├── fonts.nix │ ├── local │ ├── modprobe.conf │ ├── mount-partitions-brix.sh │ ├── mount-partitions-morefine.sh │ ├── mount-partitions-thinkpad-crypt.sh │ ├── mount-partitions-thinkpad.sh │ ├── mount-partitions-usb-1.sh │ ├── mount-partitions.sh │ ├── root-hints.url │ ├── root-servers │ ├── root-zone.url │ ├── ru-en.map │ ├── system-gerbil.scm │ ├── system-guile.scm │ ├── system-lisp-settings-brix.lisp │ ├── system-lisp-settings-morefine.lisp │ ├── system-lisp.lisp │ ├── test-system-brix.nix │ ├── test-system-morefine.nix │ ├── test-system-thinkpad-crypt.nix │ ├── test-system-thinkpad.nix │ ├── test-system-usb-1.nix │ ├── test-system.nix │ ├── tld-list.txt │ ├── tld-list.url │ └── user-info.lisp ├── marionette-harness │ ├── aiodns.nix │ ├── aiohttp-cors.nix │ ├── aiohttp.nix │ ├── aiosignal.nix │ ├── apipkg.nix │ ├── appdirs.nix │ ├── async-timeout.nix │ ├── async_generator.nix │ ├── asynctest.nix │ ├── atomicwrites.nix │ ├── attrs.nix │ ├── backports_functools_lru_cache.nix │ ├── black.nix │ ├── blessings.nix │ ├── browsermob-proxy.nix │ ├── cchardet.nix │ ├── certifi.nix │ ├── cffi.nix │ ├── chardet.nix │ ├── charset-normalizer.nix │ ├── colorama.nix │ ├── configparser.nix │ ├── contextlibe2.nix │ ├── cookies.nix │ ├── coverage.nix │ ├── cryptography-py27-warning.patch │ ├── cryptography-vectors.nix │ ├── cryptography.nix │ ├── cython.nix │ ├── dataclasses.nix │ ├── dateutil.nix │ ├── default.nix │ ├── enum34.nix │ ├── execnet.nix │ ├── filelock.nix │ ├── flake8.nix │ ├── flaky.nix │ ├── flit-core.nix │ ├── flit.nix │ ├── freezegun.nix │ ├── frozenlist.nix │ ├── funcsigs.nix │ ├── functools32.nix │ ├── gunicorn.nix │ ├── h2.nix │ ├── hpack.nix │ ├── hyperframe.nix │ ├── hypothesis.nix │ ├── idna-ssl.nix │ ├── idna.nix │ ├── importlib-metadata.nix │ ├── ipaddress.nix │ ├── iso8601.nix │ ├── itsdangerous.nix │ ├── linecache2.nix │ ├── manifestparser.nix │ ├── marionette_driver.nix │ ├── mccabe.nix │ ├── mock.nix │ ├── more-itertools.nix │ ├── mozcrash.nix │ ├── mozdevice.nix │ ├── mozfile.nix │ ├── mozhttpd.nix │ ├── mozinfo.nix │ ├── mozlog.nix │ ├── moznetwork.nix │ ├── mozprocess.nix │ ├── mozprofile.nix │ ├── mozrunner.nix │ ├── mozterm.nix │ ├── moztest.nix │ ├── mozversion.nix │ ├── multidict.nix │ ├── mypy-extensions.nix │ ├── nose.nix │ ├── numpy.nix │ ├── packaging.nix │ ├── parameterized.nix │ ├── pathlib2.nix │ ├── pathspec.nix │ ├── pathtools.nix │ ├── pbr.nix │ ├── pexpect.nix │ ├── platformdirs.nix │ ├── pluggy.nix │ ├── pretend.nix │ ├── psutil.nix │ ├── ptyprocess.nix │ ├── py.nix │ ├── pyasn1-modules.nix │ ├── pyasn1.nix │ ├── pycares.nix │ ├── pycodestyle.nix │ ├── pycparser.nix │ ├── pyflakes.nix │ ├── pyopenssl.nix │ ├── pyparsing.nix │ ├── pysocks.nix │ ├── pytest-asyncio.nix │ ├── pytest-black.nix │ ├── pytest-check-hook.nix │ ├── pytest-check-hook.sh │ ├── pytest-cov.nix │ ├── pytest-flake8.nix │ ├── pytest-forked.nix │ ├── pytest-freezegun.nix │ ├── pytest-localserver.nix │ ├── pytest-mock.nix │ ├── pytest-runner.nix │ ├── pytest-timeout.nix │ ├── pytest-xdist.nix │ ├── pytest-xprocess.nix │ ├── pytest.nix │ ├── pytz.nix │ ├── pyyaml.nix │ ├── re-assert.nix │ ├── regex.nix │ ├── requests.nix │ ├── requests_download.nix │ ├── responses.nix │ ├── scandir.nix │ ├── service-identity.nix │ ├── setuptools-scm.nix │ ├── setuptools-tag-date.patch │ ├── setuptools.nix │ ├── six.nix │ ├── sortedcontainers.nix │ ├── testpath.nix │ ├── toml.nix │ ├── tomli-fix-backwards-compatibility-load.patch │ ├── tomli.nix │ ├── tornado.nix │ ├── traceback2.nix │ ├── trustme.nix │ ├── typed-ast.nix │ ├── typing-extensions.nix │ ├── typing.nix │ ├── unittest2.nix │ ├── urllib3.nix │ ├── uvloop.nix │ ├── watchdog.nix │ ├── wcwidth.nix │ ├── werkzeug.nix │ ├── wptserve.nix │ ├── yarl.nix │ ├── zipfile36.nix │ └── zipp.nix ├── marionette-python-packages.nix ├── modprobe.conf ├── pam.nix ├── result │ └── bin │ │ └── firefox-launcher ├── rlwrap-user-shell.sh ├── run-user-shell.sh ├── send-to-user-lisp-shell-evaluator.sh ├── setup-pre-custom.sh ├── spawn-getty.sh ├── stumpwm │ ├── props-to-tags.lisp │ ├── stumpwm-socket.lisp │ └── wse-props.lisp ├── system-bin.nix ├── system-etc-pieces.nix ├── system-gerbil.nix ├── system-gerbil.scm ├── system-global.nix ├── system-guile.nix ├── system-instance.nix ├── system-lisp.lisp ├── system-lisp.nix ├── system-setuid.nix ├── system-sw-pieces.nix ├── test-system.nix ├── ttf-to-psf.nix ├── use-console.sh ├── use-from-nixos.nix ├── user │ ├── firefox-profile-skel-natural │ │ ├── chrome │ │ │ └── userChrome.css │ │ ├── prefs.js │ │ └── search.json │ ├── firefox-profile-skel-noconfig │ │ ├── chrome │ │ │ └── userChrome.css │ │ └── search.json │ ├── firefox-profile-skel │ │ ├── chrome │ │ │ └── userChrome.css │ │ ├── prefs.js │ │ └── search.json │ ├── profile │ ├── tools.nix │ ├── user-shell-thinkpad.lisp │ ├── user-shell.lisp │ └── user-shell.nix └── wrapped-firefox-launcher.nix ├── large-initrd-demo ├── hello.c ├── initrd.nix └── packages.nix ├── lesser-expressions ├── bergamot-model.nix ├── bergamot.nix ├── curl-impersonate-fork │ ├── curl-impersonate-0.5.2-fix-shebangs.patch │ ├── default.nix │ └── deps.nix ├── default.conf ├── flashplayer.nix ├── flask_inputs │ ├── requirements.nix │ ├── requirements_frozen.txt │ └── requirements_override.nix ├── hydra-grab.conf ├── importlib_metadata │ ├── requirements.nix │ ├── requirements_frozen.txt │ └── requirements_override.nix ├── lisp-packages.nix ├── mautrix-telegram │ ├── requirements.nix │ ├── requirements_frozen.txt │ └── requirements_override.nix ├── ollama-vulkan.nix ├── openjml.nix ├── package-sets-for-morefine │ ├── build-llama-cpp-version.sh │ ├── default.conf │ ├── raskin-user-heavy.nix │ ├── raskin-user-light.nix │ ├── raskin-user-llm.nix │ └── raskin-user-smaller.nix ├── pb.nix ├── plastex │ ├── requirements.nix │ ├── requirements_frozen.txt │ └── requirements_override.nix ├── prepare-libraries.lisp ├── qvge │ ├── default.nix │ └── set-graphviz-path.patch ├── raskin-firefox-extensions.nix ├── raskin-user-communication-servers.nix ├── raskin-user-heavy.nix ├── raskin-user-light.nix ├── raskin-user-lisps.nix ├── raskin-user-nixos-gc-pin.nix ├── raskin-user-priority.nix ├── raskin-user-smaller.nix ├── raskin-user-toys.nix ├── raskin-user-ultraheavy.nix ├── raskin-user-unfree.nix ├── raskin-user.nix ├── stable-diffusion-cpp.nix ├── test-texlive.nix ├── texlive-set.nix ├── tmux-sixel-fixes-issue-3839-at-2024-02-25.diff └── tptp4X.nix ├── live-dvd-module.nix ├── live-dvd.nix ├── lspci.raskin ├── matlab-fhs-env.nix ├── minimal-container-nixos.nix ├── misc-scripts └── special-chroot ├── mount-my-partitions.sh ├── nix-build-machines.nix ├── nvidia-test.nix ├── package-groups.nix ├── postgresql.nix ├── private-packages.nix ├── private-packages └── node-purple │ └── node-purple │ ├── default.nix │ ├── node-env.nix │ ├── node-packages.nix │ └── override.nix ├── raskin-asus-n53j.nix ├── raskin-asus-ux32ln.nix ├── raskin-config.nix ├── raskin-usb-rescue-packages.nix ├── raskin-usb-rescue.nix ├── raskin.nix ├── root-servers ├── second-notebook.nix ├── server-ariel.nix ├── services-main.nix ├── setuid-programs.nix ├── sudoers ├── system-init.sh ├── system-setup.sh ├── texlive-set.nix ├── third-notebook.nix ├── tools-for-cosmo └── toolset.nix ├── tools-for-pinephone └── toolset.nix ├── tools-for-vps ├── dehydrated-hook.sh ├── dehydrated.conf ├── dehydrated.service ├── dehydrated.timer ├── dovecot.conf ├── dovecot.conf.per-domain ├── dovecot.service ├── env ├── grab-ntp-time.service ├── ii-libera-chat.service ├── ii-oftc.service ├── ii-starter ├── ii-starter-libera-chat ├── ii-starter-oftc ├── ii-summarise ├── ii.service ├── laptop-side.nix ├── nat ├── nginx.conf ├── nginx.service ├── nginx.ssl.conf ├── opendkim.conf ├── opendkim.service ├── openvpn-tcp.service ├── openvpn.service ├── pam │ ├── auth │ └── dovecot ├── postfix-key-concat.service ├── postfix-key-concat.timer ├── postfix.service ├── postfix │ ├── main.cf │ ├── master.cf │ └── sni ├── private-settings-list.txt ├── push-tools.sh ├── scite.nix ├── screenrc ├── shadowsocks.service └── vps-side.nix ├── xserver-ati-wxga.nix └── xserver-intel.nix /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Michael Raskin 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 7c6f434c-configurations 2 | ======================= 3 | -------------------------------------------------------------------------------- /bind.nix: -------------------------------------------------------------------------------- 1 | {pkgs, config, ...}: 2 | { 3 | enable = true; 4 | ipv4Only = false; 5 | cacheNetworks = [ 6 | "127.0.0.0/24" 7 | "::1/128" 8 | "localhost" 9 | "192.168.0.0/16" 10 | ]; 11 | zones = [ 12 | { 13 | name = __substring 0 8 config.networking.hostName; 14 | file = "/root/nix-sysconfig/" + (builtins.substring 0 8 config.networking.hostName); 15 | } 16 | { 17 | name = "root-servers.net"; 18 | file = "" + ./root-servers; 19 | } 20 | ]; 21 | extraConfig = '' 22 | logging { 23 | category default { default_stderr; }; 24 | }; 25 | ''; 26 | } 27 | 28 | -------------------------------------------------------------------------------- /crosvm/minimal-rc.lisp: -------------------------------------------------------------------------------- 1 | (progn (require :sb-posix) (require :sb-bsd-sockets)) 2 | 3 | (with-open-file (*error-output* "/dev/null" :direction :output :if-exists :overwrite) 4 | (with-open-file (*trace-output* "/dev/null" :direction :output :if-exists :overwrite) 5 | (load (format nil "~a/lib/common-lisp/lisp-os-helpers/lisp-os-helpers--all-systems.fasl" 6 | *lisp-os-helpers-package*)))) 7 | 8 | (use-package :lisp-os-helpers/user-abbreviations) 9 | (use-package :lisp-os-helpers/socket-command-client) 10 | (use-package :lisp-os-helpers/subuser-x) 11 | (use-package :lisp-os-helpers/shell) 12 | (use-package :lisp-os-helpers/timestamp) 13 | 14 | (setf *random-state* (make-random-state t)) 15 | -------------------------------------------------------------------------------- /crosvm/rust-9p.nix: -------------------------------------------------------------------------------- 1 | { 2 | stdenv, lib, fetchFromGitHub, rust 3 | }: 4 | 5 | rust.packages.stable.rustPlatform.buildRustPackage rec { 6 | pname = "rust-9p"; 7 | version = "0.0.2019-05-17"; 8 | 9 | src = fetchFromGitHub { 10 | owner = "pfpacket"; 11 | repo = pname; 12 | rev = "01cf9c60bff0f35567d876db7be7fb86032b44eb"; 13 | sha256 = "0mhmr1912z5nyfpcvhnlgb3v67a5n7i2n9l5abi05sfqffqssi79"; 14 | }; 15 | 16 | sourceRoot = "source/example/unpfs"; 17 | 18 | cargoSha256 = "045fb0q5d8frfjq83a3v4mgck3398l23rhzwk8qkdk48xv3j1d5i"; 19 | 20 | RUSTC_BOOTSTRAP=1; 21 | 22 | postInstall = '' 23 | install -D -m 0444 ../../README* -t "$out/share/doc/${pname}" 24 | install -D -m 0444 ../../LICEN* -t "$out/share/doc/${pname}" 25 | ''; 26 | 27 | meta = with lib; { 28 | description = "9P2000.L server implementation in Rust"; 29 | homepage = "https://github.com/pfpacket/rust-9p"; 30 | license = with licenses; [ bsd3 ]; 31 | maintainers = with maintainers; [ raskin ]; 32 | 33 | # macOS build fails: https://github.com/pfpacket/rust-9p/issues/7 34 | platforms = with platforms; linux; 35 | }; 36 | } 37 | -------------------------------------------------------------------------------- /custom-vim.nix: -------------------------------------------------------------------------------- 1 | pkgs: with pkgs; 2 | vimHugeX.merge rec { 3 | name = "vim-huge-all"; 4 | features = "huge"; 5 | inherit gmp mpfr 6 | ruby gettext; 7 | flags = composableDerivation.edf ({name = "ecl"; feat = "eclinterp"; enable = {buildNativeInputs = [ecl gmp mpfr];};}); 8 | lua = lua5; 9 | cfg = { 10 | pythonSupport = true; 11 | tclSupport = true; 12 | cscopeSupport = true; 13 | xsmpSupport = true; 14 | multibyteSupport = true; 15 | ximSupport = true; 16 | nlsSupport = true; 17 | 18 | perlSupport = false; 19 | rubySupport = true; 20 | sniffSupport = true; 21 | #mzSchemeSupport = true; 22 | luaSupport = true; 23 | #hangulSupport = true; 24 | gettextSupport = true; 25 | }; 26 | } 27 | -------------------------------------------------------------------------------- /demos/ipv6.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | echo "If you have global IPv6 address correctly set up, this should show the HTTP header from SixXS site" | fmt -w 72 4 | echo 5 | 6 | curl -I -6 https://www.sixxs.net/ 7 | -------------------------------------------------------------------------------- /demos/local-packages.nix: -------------------------------------------------------------------------------- 1 | let 2 | testPackage = {bc, writeScript}: { 3 | name = "echoPi"; 4 | builder = writeScript "echoPi-builder" '' 5 | #! /bin/sh 6 | echo -e 'scale=1\n 4 * a(1)\n quit' | ${bc}/bin/bc -l; 7 | ''; 8 | }; 9 | localPkgs = pkgs: with pkgs; { 10 | testPackage = testPackage { 11 | inherit bc writeScript; 12 | }; 13 | }; 14 | pkgs = (import /etc/nixos/nixpkgs) {}; 15 | 16 | in 17 | pkgs // (localPkgs pkgs) 18 | -------------------------------------------------------------------------------- /demos/local-packages.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | echo -e 'This should use a local expression microrepository to build a new package and an inherited one. Then this test will run a small test of built packages.\n Press Enter..' | fmt -w 72 4 | read 5 | 6 | mkdir /tmp/test-local-nix-expression || true 7 | 8 | nix-build ./local-packages.nix -A testPackage -o /tmp/test-local-nix-expression/echoPi 9 | nix-build ./local-packages.nix -A bc -o /tmp/test-local-nix-expression/testBc 10 | 11 | /tmp/test-local-nix-expression/echoPi 12 | echo -e 'scale=1\n e(1)\n quit' | /tmp/test-local-nix-expression/testBc/bin/bc -l 13 | 14 | rm -r /tmp/test-local-nix-expression 15 | -------------------------------------------------------------------------------- /fat-initramfs/assemble-disk-image.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | command -v sgdisk >/dev/null || export PATH="$PATH:$(nix-build '' -f gptfdisk --no-out-link)/bin" 4 | 5 | output="$1" 6 | shift 7 | 8 | size="$1" 9 | dd if=/dev/zero count="$size" bs=1M of="$output" 10 | shift 11 | 12 | n=0 13 | while test -n "$1"; do 14 | part="$1" 15 | type="$2" 16 | label="$3" 17 | shift; shift; shift 18 | 19 | n=$((n+1)) 20 | psize="$(stat -c "%s" "$part")" 21 | pssize="$((psize/512))" 22 | 23 | sgdisk -n "$n::+$pssize" -c "$n:$label" "$output" 24 | 25 | offset="$(sgdisk -i$n "$output" | grep 'First sector: ' | sed -e 's/^First sector: //; s/ .*//')" 26 | offset_large="$((offset/2048))" 27 | dd if="$part" of="$output" conv=notrunc,nocreat bs=1M seek="$offset_large" 28 | done 29 | -------------------------------------------------------------------------------- /fat-initramfs/create-fat32.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | dd if=/dev/zero bs=1M count="${2:-1024}" of="$1" 4 | mkdosfs -F32 "$1" 5 | -------------------------------------------------------------------------------- /fat-initramfs/create-root-image.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | command -v nix || export PATH="$PATH:$(nix-build --no-out-link '' -A nixUnstable)/bin" 4 | command -v genext2fs || export PATH="$PATH:$(nix-build --no-out-link '' -A genext2fs)/bin" 5 | 6 | echo "Using PATH: $PATH" >&2 7 | 8 | temproot="$(mktemp -d)" 9 | echo "Working in $temproot" >&2 10 | 11 | output="$1" 12 | shift ; 13 | 14 | layout="$1" 15 | 16 | echo "Copying to $temproot: $*" >&2 17 | nix copy "$layout" -f '' "$@" --to local\?root="$temproot" --no-check-sigs 18 | 19 | echo "Applying $layout to $temproot" >&2 20 | cp -rfT "$layout" "$temproot" 21 | 22 | echo "Creating the image $output from $temproot" >&2 23 | test -n "$E2FS_OPTIONS" && echo "Applying options: $E2FS_OPTIONS" >&2 24 | 25 | blocks="$(du -s "$temproot" | cut -f 1)" 26 | inodes="$(find "$temproot" | wc -l)" 27 | 28 | genext2fs "$output" -d "$temproot" -U -b "$(((blocks * 11 / 10) / 2048 * 2048 + 2048 + 4096))" -N "$((inodes * 11 / 10 + 4096))" -f $E2FS_OPTIONS 29 | 30 | echo "Cleaning up $temproot" >&2 31 | chmod u+rwx -R "$temproot" 32 | rm -rf "$temproot" 33 | 34 | tune2fs -j "$output" 35 | 36 | test -e "$output" && echo "Done. Created $output" >&2 37 | -------------------------------------------------------------------------------- /fat-initramfs/grub-print-entry.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | name="$1" 4 | linux="$2" 5 | initrd="$3" 6 | 7 | shift ; shift ; shift 8 | 9 | echo " 10 | menuentry \"$name\" { 11 | linux (\$drive1)/kernels/$(basename $linux) $* 12 | initrd (\$drive1)/kernels/$(basename $initrd) 13 | } 14 | " 15 | -------------------------------------------------------------------------------- /fat-initramfs/grub-print-header.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | fsuuid="$(grub-probe "$1" -t fs_uuid)" 4 | 5 | echo " 6 | # Automatically generated 7 | 8 | search --set=drive1 --fs-uuid $fsuuid 9 | 10 | if [ -s \$prefix/grubenv ]; then 11 | load_env 12 | fi 13 | 14 | insmod efi_gop 15 | insmod efi_uga 16 | insmod font 17 | 18 | if loadfont (\$drive1)//grub/fonts/unicode.pf2; then 19 | insmod gfxterm 20 | set gfxmode=auto 21 | set gfxpayload=keep 22 | terminal_output gfxterm 23 | fi 24 | 25 | set default=0 26 | set timeout=15 27 | "; 28 | -------------------------------------------------------------------------------- /fat-initramfs/modprobe.conf: -------------------------------------------------------------------------------- 1 | blacklist evbug 2 | blacklist pstore 3 | blacklist efi-pstore 4 | 5 | -------------------------------------------------------------------------------- /fat-initramfs/test-caller.nix: -------------------------------------------------------------------------------- 1 | rec { 2 | stage1 = import ./fat-initramfs.nix { 3 | mountScript = '' 4 | while ! test -e /dev/sda2; do 5 | sleep 0.1 6 | done 7 | mount -t ext4 /dev/sda2 /new-root 8 | mount /dev/sda1 /new-root/boot 9 | ''; 10 | blacklistUdevRules = ["80-net-name-slot.rules"]; 11 | modprobeConfig = (builtins.readFile ./modprobe.conf); 12 | firmwarePackages = []; 13 | }; 14 | 15 | stage2 = import ./stage-2-template.nix { 16 | inherit stage1; 17 | }; 18 | 19 | stage2small = import ./stage-2-template.nix { 20 | inherit stage1; 21 | allOutputs = false; 22 | }; 23 | } 24 | -------------------------------------------------------------------------------- /fat-initramfs/use-from-nixos.nix: -------------------------------------------------------------------------------- 1 | {pkgs, nixos}: 2 | { 3 | serviceScript = name: config: 4 | (builtins.getAttr name (nixos {configuration = config;}).config.systemd.services).runner; 5 | 6 | etcSelect = filename: config: 7 | let 8 | nixosInstance = nixos {configuration = config;}; 9 | selected = (pkgs.lib.filterAttrs (k: v: v.target == filename) nixosInstance.config.environment.etc); 10 | source = (builtins.getAttr (builtins.head (builtins.attrNames selected)) selected).source; 11 | in (if pkgs.lib.isString source then source else source.outPath); 12 | } 13 | -------------------------------------------------------------------------------- /filesystems-main.nix: -------------------------------------------------------------------------------- 1 | {...}: 2 | [ 3 | { mountPoint = "/"; 4 | device = "/dev/sda5"; 5 | fsType = "ext3"; 6 | 7 | # Enable POSIX Acess Control Lists and user-set 8 | # extended attributes in user.* namespace 9 | options = "acl,user_xattr"; 10 | } 11 | { mountPoint = "/boot"; 12 | device = "/dev/sda1"; 13 | neededForBoot = true; 14 | } 15 | { mountPoint = "/nix/store"; 16 | device = "/dev/sda11"; 17 | neededForBoot = true; 18 | fsType = "btrfs"; 19 | options = "noatime"; 20 | } 21 | { mountPoint = "/home"; 22 | device = "/dev/sda7"; 23 | options = "acl,user_xattr"; 24 | neededForBoot = true; 25 | } 26 | { mountPoint = "/tmp"; 27 | device = "/dev/sda10"; 28 | fsType = "btrfs"; 29 | neededForBoot = true; 30 | options = "noatime"; 31 | } 32 | { mountPoint = "/dev/shm"; 33 | device = "memory"; 34 | fsType = "tmpfs"; 35 | } 36 | ] 37 | -------------------------------------------------------------------------------- /gb-bxi7-4770r/hardware-configuration.nix: -------------------------------------------------------------------------------- 1 | # Do not modify this file! It was generated by ‘nixos-generate-config’ 2 | # and may be overwritten by future invocations. Please make changes 3 | # to /etc/nixos/configuration.nix instead. 4 | { config, pkgs, ... }: 5 | 6 | { 7 | imports = 8 | [ # 9 | ]; 10 | 11 | boot.initrd.availableKernelModules = [ "ehci_pci" "ahci" "usb_storage" ]; 12 | boot.initrd.kernelModules = ["fbcon" "hid_generic" "usbhid" "xhci-hcd"]; 13 | boot.kernelModules = [ "kvm-intel" ]; 14 | boot.extraModulePackages = [ ]; 15 | 16 | fileSystems."/" = 17 | { label = "SystemRoot"; 18 | fsType = "btrfs"; 19 | neededForBoot = true; 20 | }; 21 | 22 | fileSystems."/boot" = 23 | { label = "EFI"; 24 | fsType = "vfat"; 25 | neededForBoot = true; 26 | }; 27 | 28 | fileSystems."/nix" = 29 | { label = "Nix"; 30 | fsType = "btrfs"; 31 | neededForBoot = true; 32 | }; 33 | 34 | fileSystems."/tmp" = 35 | { label = "Tmp"; 36 | fsType = "btrfs"; 37 | neededForBoot = true; 38 | }; 39 | 40 | swapDevices =[ 41 | { label = "Swap"; } 42 | ]; 43 | 44 | nix.maxJobs = 8; 45 | } 46 | -------------------------------------------------------------------------------- /gb-bxi7-4770r/nixpkgs-config.nix: -------------------------------------------------------------------------------- 1 | { 2 | 3 | } 4 | -------------------------------------------------------------------------------- /init-less-system/generic/deploy-grub-via-chroot.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | "$(dirname "$0")"/build-derivation-in-chroot.sh "$1" "$(nix-instantiate '' -A grub2_efi)" '' --option binary-caches "https://cache.nixos.org http://127.0.0.1:32062/ $NIX_BINARY_CACHES" 4 | mkdir "$1"/boot/EFI 5 | chroot "$1" "$(nix-store -q --outputs "$(nix-instantiate '' -A grub2_efi)" | grep -v debug | head -n 1)/bin/grub-install" --efi-directory=/boot 6 | -------------------------------------------------------------------------------- /init-less-system/generic/deploy-nix-to-chroot.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | tgt="$1" 4 | nix="${2:-$(nix-build --no-out-link '' -A nixUnstable)}" 5 | extra="$3" 6 | 7 | deps="$(nix-store -qR $nix $extra)" 8 | nixdeps="$(nix-store -qR $nix )" 9 | 10 | echo "Deploying $nix and also [ $extra ] to $tgt" 11 | echo "Adding [ $deps ]" 12 | echo "Starting with [ $nixdeps ]" 13 | 14 | test -n "$nixdeps" && rsync -aRr $nixdeps "$tgt" 15 | nix-store --export $deps | chroot "$tgt" "$nix/bin/nix-store" --import 16 | -------------------------------------------------------------------------------- /init-less-system/generic/grub-print-entry.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | name="$1" 4 | linux="$2" 5 | initrd="$3" 6 | 7 | shift ; shift ; shift 8 | 9 | echo " 10 | menuentry \"$name\" { 11 | linux (\$drive1)/kernels/$(basename $linux) $* 12 | initrd (\$drive1)/kernels/$(basename $initrd) 13 | } 14 | " 15 | -------------------------------------------------------------------------------- /init-less-system/generic/grub-print-header.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | fsuuid="$(grub-probe "$1" -t fs_uuid)" 4 | 5 | echo " 6 | # Automatically generated 7 | 8 | search --set=drive1 --fs-uuid $fsuuid 9 | 10 | if [ -s \$prefix/grubenv ]; then 11 | load_env 12 | fi 13 | 14 | insmod efi_gop 15 | insmod efi_uga 16 | insmod font 17 | 18 | if loadfont (\$drive1)//grub/fonts/unicode.pf2; then 19 | insmod gfxterm 20 | set gfxmode=auto 21 | set gfxpayload=keep 22 | terminal_output gfxterm 23 | fi 24 | 25 | set default=0 26 | set timeout=15 27 | "; 28 | -------------------------------------------------------------------------------- /init-less-system/my/mount-partitions-usb.sh: -------------------------------------------------------------------------------- 1 | 2 | export HOME=/root 3 | 4 | grep boot.no-mount /proc/cmdline && exec /init-tools/bin/sh 5 | 6 | readlink -f /dev/disk/by-label/128_USB_SWAP > /sys/power/resume 7 | 8 | udevadm trigger -c add 9 | udevadm trigger 10 | udevadm settle 11 | 12 | readlink -f /dev/disk/by-label/128_USB_SWAP > /sys/power/resume 13 | 14 | for i in /dev/sd?; do hdparm -B 255 $i; done 15 | 16 | mkdir /new-root 17 | 18 | mount /dev/disk/by-label/128_USB_MAIN /new-root 19 | 20 | { 21 | mkdir -p /new-root/boot 22 | mount /dev/disk/by-label/USB128BOOT /new-root/boot 23 | } & 24 | { 25 | mkswap /dev/disk/by-label/128_USB_SWAP -L 128_USB_SWAP 26 | swapon $( readlink -f /dev/disk/by-label/128_USB_SWAP ) 27 | } & 28 | 29 | while pgrep mount; do sleep 0.1; done 30 | 31 | -------------------------------------------------------------------------------- /init-less-system/my/pseudo-system-thinkpad-rebuild.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | nix-env --set -p /nix/var/nix/profiles/everescue-nix -f "$(dirname "$0")/pseudo-system-thinkpad.nix" -A system --fallback "$@" && 4 | /nix/var/nix/profiles/everescue-nix/bin/switch 5 | -------------------------------------------------------------------------------- /initrd-to-read-boot/create-efi-entry.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | loaderdir="/boot/EFI/everescue-nix/" 4 | mkdir -p "$loaderdir" 5 | 6 | kernel="$1" 7 | initrd="$2" 8 | target="$3" 9 | version="$4" 10 | 11 | [ "$kernel" = - ] && kernel= 12 | [ "$initrd" = - ] && initrd= 13 | 14 | kernel="${kernel:-$target/boot/kernel-package}" 15 | initrd="${initrd:-$target/boot/initrd-package}" 16 | 17 | kernel="$(readlink -f "$kernel")" 18 | initrd="$(readlink -f "$initrd")" 19 | 20 | kbasename="$(basename "$kernel")-bzImage.efi" 21 | ibasename="$(basename "$initrd")-initrd.efi" 22 | cp "$kernel/bzImage" "$loaderdir/$kbasename" 23 | cp "$initrd/initrd" "$loaderdir/$ibasename" 24 | 25 | echo " 26 | title EveRescue/Nix 27 | version Generation $version 28 | machine-id $(cat /etc/machine-id) 29 | 30 | linux /EFI/everescue-nix/$kbasename 31 | initrd /EFI/everescue-nix/$ibasename 32 | options targetSystem=$target BOOT_IMAGE=$kernel 33 | " | tee /boot/loader/entries/everescue-nix-generation-"$version".conf 34 | [ -n "$EFI_SET_DEFAULT" ] && sed -e "s@^default .*@default everescue-nix-generation-$version@" -i /boot/loader/loader.conf 35 | -------------------------------------------------------------------------------- /initrd-to-read-boot/hello.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main () { 4 | fprintf(stdout, "Hello.\n"); 5 | while(1); 6 | return 0; 7 | } 8 | -------------------------------------------------------------------------------- /initrd-to-read-boot/initrd.nix: -------------------------------------------------------------------------------- 1 | { pkgs ? import {}, 2 | tools ? import ./tools.nix {} 3 | }: 4 | with pkgs // tools; 5 | rec { 6 | initrdHello = makeBasicInitrd { 7 | initScript = '' 8 | #!/init-tools/bin/sh 9 | ${init-hello} 10 | ''; 11 | }; 12 | qemuScriptHello = qemuLauncherFun {initrd = initrdHello;}; 13 | 14 | initrdHelloSh = makeBasicInitrd { 15 | initScript = '' 16 | #!/init-tools/bin/sh 17 | echo Hello 18 | /init-tools/bin/sleep 10 19 | ''; 20 | }; 21 | qemuScriptHelloSh = qemuLauncherFun {initrd = initrdHelloSh;}; 22 | 23 | initrdSh = makeOverridable makeUdevInitrd { 24 | modules = typicalNotebookModules; 25 | modulesAvailable = typicalNotebookAvailableModules; 26 | }; 27 | qemuScriptSh = qemuLauncherFun {initrd = initrdSh;}; 28 | } 29 | -------------------------------------------------------------------------------- /initrd-to-read-boot/mini-udev.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | echo "$@" > /dev/kmsg 4 | set > /tmp/log 5 | -------------------------------------------------------------------------------- /initrd-to-read-boot/pseudo-system-rebuild.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | nix-env -p /nix/var/nix/profiles/everescue-nix --set -f "$(dirname "$0")"/pseudo-system.nix -A system --fallback "$@" 4 | rm /boot/loader/entries/everescue-nix-generation-*.conf 5 | "$(dirname "$0")"/create-efi-entry.sh - - "$(readlink -f "/run/booted-system")" "previous boot" 6 | for i in /nix/var/nix/profiles/everescue-nix-*-link; do 7 | n="${i}" 8 | n="${n%-link}" 9 | n="${n##*-}" 10 | "$(dirname "$0")"/create-efi-entry.sh - - "$(readlink -f "$i")" "$n" 11 | done 12 | maxn="$( ls -d /nix/var/nix/profiles/everescue-nix-*-link | sed -e 's@-link$@@; s@.*-@@' | sort -n | tail -n 1 )" 13 | EFI_SET_DEFAULT=1 "$(dirname "$0")"/create-efi-entry.sh - - "$(readlink -f "/nix/var/nix/profiles/everescue-nix-${maxn}-link")" "$maxn" 14 | -------------------------------------------------------------------------------- /initrd-to-read-boot/sync-nix-store.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | ensure_copies () { 4 | source="$1" 5 | prefix="$2" 6 | target="$prefix/$source" 7 | mkdir -p "$target"/{.trash,.to-delete} 8 | find "$target/.to-delete/" -mindepth 1 -execdir rm -r '{}' ';' 9 | 10 | wanted="$(cat | sort)" 11 | 12 | existing="$(cd "$target"; ls | sort)" 13 | 14 | for i in $existing; do touch "$target/.to-delete/$i"; done 15 | for i in $wanted; do 16 | [ -e "$target/$i" ] || 17 | { 18 | echo "Copying $i .." >&2 19 | cp -r "$source/$i" "$target/$i" 20 | echo "Done" >&2 21 | }; 22 | rm -f "$target/.to-delete/$i" 23 | done 24 | for i in $(cd "$target/.to-delete"; ls); do 25 | echo "Removing $i" >&2 26 | chmod u+w -R "$target/$i" 27 | mv "$target/$i" "$target/.trash/$i" 28 | done 29 | echo "Removing garbage" >&2 30 | rm -rf "$target/.trash" 31 | echo "Done" >&2 32 | } 33 | 34 | ensure_nix_copies () { 35 | source="${NIX_STORE_DIR:-/nix/store}" 36 | prefix="$1" 37 | xargs nix-store -qR | xargs -l1 basename | 38 | ensure_copies "$source" "$prefix" 39 | } 40 | 41 | "$@" 42 | -------------------------------------------------------------------------------- /initrd-to-read-boot/unpack-initrd.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | cat "$1" | ( chmod u+w -R "$2"; rm -rf "$2"; mkdir "$2"; cd "$2"; gunzip | cpio -i ) 4 | -------------------------------------------------------------------------------- /kernel-options.nix: -------------------------------------------------------------------------------- 1 | {pkgs, ...}: rec { 2 | #baseKernel = pkgs.kernel_2_6_33_zen1_bfs; 3 | #baseKernel = pkgs.kernel_2_6_36; 4 | baseKernel = rec{ 5 | kernelPackages = pkgs.linuxPackagesFor pkgs.linux_latest; 6 | #kernelPackages = pkgs.linuxPackagesFor pkgs.linux_4_9; 7 | extraModulePackages = [kernelPackages.acpi_call /*kernelPackages.aufs */ 8 | /*kernelPackages.sysdig*/ 9 | kernelPackages.bbswitch 10 | /*kernelPackages.virtualbox*/ 11 | ]; 12 | }; 13 | } 14 | -------------------------------------------------------------------------------- /lang-os/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Michael Raskin 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /lang-os/README.md: -------------------------------------------------------------------------------- 1 | # lang-os 2 | A minimal system managed by policy daemons with configuration being arbitrary code 3 | -------------------------------------------------------------------------------- /lang-os/build-user-shell-binary.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | "$(dirname "$0")"/run-user-shell.sh --eval "(build-shell \"$1\")" 4 | -------------------------------------------------------------------------------- /lang-os/c/file-lock.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | 10 | int main (int argc, char** argv){ 11 | assert(argc>=2); 12 | int fd = open(argv[1], O_RDWR | O_CREAT, 0600); 13 | assert(fd != -1); 14 | 15 | flock(fd, LOCK_EX); 16 | assert(write(1,"OK\n",3)==3); 17 | char in; 18 | assert(read(0,&in,1)==1); 19 | flock(fd, LOCK_UN); 20 | return 0; 21 | } 22 | -------------------------------------------------------------------------------- /lang-os/c/numeric-su.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | int main ( int argc, char**argv){ 7 | assert(argc>3); 8 | 9 | int uid=atoi(argv[1]); 10 | int gid=atoi(argv[2]); 11 | 12 | assert(uid); 13 | if(gid==0) gid = 65534; 14 | 15 | if(gid>0){ 16 | assert(setgid(gid)==0); 17 | assert(setregid(gid,gid)==0); 18 | 19 | assert(setgroups(0,NULL)==0); 20 | } 21 | 22 | assert(setuid(uid)==0); 23 | assert(setreuid(uid,uid)==0); 24 | 25 | return execvp(argv[3],argv+3); 26 | } 27 | -------------------------------------------------------------------------------- /lang-os/c/simulate-setid.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | int main ( int argc, char**argv){ 7 | assert(argc>3); 8 | 9 | int uid=atoi(argv[1]); 10 | int gid=atoi(argv[2]); 11 | 12 | assert(uid); 13 | if(gid==0) gid = 65534; 14 | 15 | if(gid>0){ 16 | assert(setregid(gid,0)==0); 17 | 18 | assert(setgroups(0,NULL)==0); 19 | } 20 | 21 | assert(setreuid(uid,0)==0); 22 | 23 | return execvp(argv[3],argv+3); 24 | } 25 | -------------------------------------------------------------------------------- /lang-os/grub-print-entry.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | name="$1" 4 | linux="$2" 5 | initrd="$3" 6 | 7 | shift ; shift ; shift 8 | 9 | echo " 10 | menuentry \"$name\" { 11 | linux (\$drive1)/kernels/$(basename $linux) $* 12 | initrd (\$drive1)/kernels/$(basename $initrd) 13 | } 14 | " 15 | -------------------------------------------------------------------------------- /lang-os/grub-print-header.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | fsuuid="$(grub-probe "$1" -t fs_uuid)" 4 | if test -z "$fsuuid"; then 5 | fsdev="$(cat /proc/mounts | cut -d ' ' -f 1,2 | grep " $1\$" | cut -d ' ' -f 1)" 6 | fsuuid="$(blkid -o value -s UUID "$fsdev")" 7 | fi 8 | 9 | echo " 10 | # Automatically generated 11 | 12 | search --set=drive1 --fs-uuid $fsuuid 13 | 14 | if [ -s \$prefix/grubenv ]; then 15 | load_env 16 | fi 17 | 18 | insmod efi_gop 19 | insmod efi_uga 20 | insmod font 21 | 22 | if loadfont (\$drive1)//grub/fonts/unicode.pf2; then 23 | insmod gfxterm 24 | set gfxmode=auto 25 | set gfxpayload=keep 26 | terminal_output gfxterm 27 | fi 28 | 29 | set default=0 30 | set timeout=${grub_timeout:-15} 31 | "; 32 | -------------------------------------------------------------------------------- /lang-os/lisp-os-helpers.nix: -------------------------------------------------------------------------------- 1 | { 2 | pkgs, src, deps 3 | }: 4 | pkgs.sbcl.buildASDFSystem { 5 | pname = "lisp-os-helpers"; 6 | version = "0.0-unstable"; 7 | 8 | inherit src; 9 | 10 | lispLibs = deps; 11 | 12 | description = "Local library for defining and interacting with Common Lisp system daemon"; 13 | 14 | } 15 | 16 | -------------------------------------------------------------------------------- /lang-os/lisp-os-helpers/file-locks.lisp: -------------------------------------------------------------------------------- 1 | (defpackage :lisp-os-helpers/file-locks 2 | (:use :common-lisp) 3 | (:export 4 | #:with-file-lock 5 | #:*file-lock-helper* 6 | )) 7 | 8 | (in-package :lisp-os-helpers/file-locks) 9 | 10 | (defvar *file-lock-helper* "/run/current-system/sw/bin/file-lock") 11 | 12 | (defmacro with-file-lock ((path &key (file-lock-helper *file-lock-helper*)) &body body) 13 | `(progn 14 | (ensure-directories-exist ,path) 15 | (let* 16 | ((locker-process (uiop:launch-program (list ,file-lock-helper ,path) 17 | :input :stream :output :stream)) 18 | (locker-input (uiop:process-info-input locker-process)) 19 | (locker-output (uiop:process-info-output locker-process))) 20 | (unwind-protect 21 | (progn 22 | (read-line locker-output) 23 | ,@body) 24 | (format locker-input "OK~%") 25 | (force-output locker-input) 26 | (close locker-input) 27 | (close locker-output) 28 | (uiop:terminate-process locker-process) 29 | (sleep 0.001) 30 | (uiop:terminate-process locker-process :urgent t))))) 31 | 32 | -------------------------------------------------------------------------------- /lang-os/lisp-os-helpers/plain-web.lisp: -------------------------------------------------------------------------------- 1 | (defpackage :lisp-os-helpers/plain-web 2 | (:use 3 | :common-lisp 4 | ) 5 | (:export 6 | )) 7 | (in-package :lisp-os-helpers/plain-web) 8 | 9 | -------------------------------------------------------------------------------- /lang-os/lisp-os-helpers/read-eval-print-once.lisp: -------------------------------------------------------------------------------- 1 | (defpackage :lisp-os-helpers/read-eval-print-once 2 | (:use :common-lisp) 3 | (:export 4 | #:read-eval-print 5 | #:package-rep 6 | #:load-rep 7 | ) 8 | (:nicknames :rep1)) 9 | (in-package :lisp-os-helpers/read-eval-print-once) 10 | 11 | (defun read-eval-print () 12 | (handler-case (format t "~s~%" (eval (read))) 13 | (error (e) 14 | (format *error-output* "~%~%~a~%" e) 15 | (trivial-backtrace:print-backtrace-to-stream *error-output*) 16 | (format *error-output* "~a~%" e)))) 17 | 18 | (defun package-rep (&rest packages) 19 | (loop for package in packages do (use-package package)) 20 | (read-eval-print)) 21 | 22 | (defun load-rep (&rest files) 23 | (loop for f in files do (load f)) 24 | (read-eval-print)) 25 | -------------------------------------------------------------------------------- /lang-os/lisp-os-helpers/sound.lisp: -------------------------------------------------------------------------------- 1 | (defpackage :lisp-os-helpers/sound 2 | (:use 3 | :common-lisp 4 | ) 5 | (:export 6 | )) 7 | (in-package :lisp-os-helpers/sound) 8 | 9 | -------------------------------------------------------------------------------- /lang-os/lisp-server-helpers.nix: -------------------------------------------------------------------------------- 1 | { 2 | pkgs, src, deps 3 | }: 4 | pkgs.lispPackages.buildLispPackage { 5 | inherit (pkgs) stdenv; 6 | inherit (pkgs.lispPackages) clwrapper; 7 | 8 | inherit src deps; 9 | 10 | baseName = "server-helpers"; 11 | buildSystems = ["server-helpers"]; 12 | description = "Local library for Common Lisp system server"; 13 | 14 | overrides = x: { 15 | postInstall = '' 16 | NIX_LISP_PRELAUNCH_HOOK='nix_lisp_run_single_form "(asdf:perform (quote asdf:monolithic-compile-bundle-op) :server-helpers)"' "$out"/bin/*-lisp-launcher.sh "" 17 | ''; 18 | }; 19 | } 20 | 21 | -------------------------------------------------------------------------------- /lang-os/lisp-server-helpers/file-locks.lisp: -------------------------------------------------------------------------------- 1 | (defpackage :file-locks 2 | (:use :common-lisp) 3 | (:export 4 | #:with-file-lock 5 | #:*file-lock-helper* 6 | )) 7 | 8 | (in-package :file-locks) 9 | 10 | (defvar *file-lock-helper* "/run/current-system/sw/bin/file-lock") 11 | 12 | (defmacro with-file-lock ((path &key (file-lock-helper *file-lock-helper*)) &body body) 13 | `(progn 14 | (ensure-directories-exist ,path) 15 | (let* 16 | ((locker-process (uiop:launch-program (list ,file-lock-helper ,path) 17 | :input :stream :output :stream)) 18 | (locker-input (uiop:process-info-input locker-process)) 19 | (locker-output (uiop:process-info-output locker-process))) 20 | (unwind-protect 21 | (progn 22 | (read-line locker-output) 23 | ,@body) 24 | (format locker-input "OK~%") 25 | (force-output locker-input) 26 | (close locker-input) 27 | (close locker-output) 28 | (uiop:terminate-process locker-process) 29 | (sleep 0.001) 30 | (uiop:terminate-process locker-process :urgent t))))) 31 | 32 | -------------------------------------------------------------------------------- /lang-os/lisp-server-helpers/server-helpers.asd: -------------------------------------------------------------------------------- 1 | (asdf:defsystem 2 | :server-helpers 3 | :depends-on 4 | ( 5 | :iolib :iolib/os :iolib/syscalls 6 | :uiop :iterate :cl-ppcre :bordeaux-threads :local-time alexandria 7 | :clsql :clsql-sqlite3 8 | ) 9 | :serial nil 10 | :components 11 | ( 12 | (:file "shell") 13 | (:file "file-locks") 14 | (:file "vt" :depends-on ("shell" "file-locks")) 15 | (:file "references") 16 | (:file "fbterm-requests" :depends-on ("vt" "file-locks")) 17 | (:file "safe-read") 18 | (:file "auth-data" :depends-on ("shell")) 19 | (:file "timestamp") 20 | (:file "network" :depends-on ("shell")) 21 | (:file "daemon" :depends-on ("shell" "timestamp")) 22 | (:file "global-sqlite") 23 | (:file "nix" :depends-on ("shell")) 24 | (:file "unix-users") 25 | (:file "socket-command-server" :depends-on ("safe-read" "references" "auth-data" "fbterm-requests")) 26 | (:file "subuser" :depends-on ("shell" "timestamp" "global-sqlite")) 27 | ) 28 | ) 29 | -------------------------------------------------------------------------------- /lang-os/lisp-server-helpers/unix-users.lisp: -------------------------------------------------------------------------------- 1 | 2 | (defpackage :unix-users 3 | (:use :common-lisp) 4 | (:import-from :iolib/syscalls 5 | #:getpwnam 6 | #:getgrnam 7 | ) 8 | (:export 9 | #:getpwnam 10 | #:getgrnam 11 | #:add-daemon-group 12 | #:add-daemon-user 13 | #:ensure-daemon-user 14 | #:ensure-daemon-group 15 | #:grant-to-user 16 | #:grant-to-group 17 | )) 18 | (in-package :unix-users) 19 | 20 | (defun add-daemon-group (name) 21 | (uiop:run-program 22 | (list "groupadd" "-r" "-R" "/var/auth" name))) 23 | 24 | (defun add-daemon-user (name) 25 | (uiop:run-program 26 | (list "useradd" "-R" "/var/auth" "-r" "-g" name "-s" "/run/current-system/sw/bin/nologin" "-d" "/var/empty" name))) 27 | 28 | (defun ensure-daemon-user (name) 29 | (unless (getgrnam name) (add-daemon-group name)) 30 | (unless (getpwnam name) (add-daemon-user name))) 31 | 32 | (defun ensure-daemon-group (name) 33 | (unless (getgrnam name) (add-daemon-group name))) 34 | 35 | (defun grant-to-user (name path) 36 | (uiop:run-program (list "chown" name path))) 37 | 38 | (defun grant-to-group (name path) 39 | (uiop:run-program (list "chgrp" name path))) 40 | -------------------------------------------------------------------------------- /lang-os/local/local: -------------------------------------------------------------------------------- 1 | ; Local zone 2 | ; 3 | $TTL 518400 4 | 5 | @ IN NS ns.local. 6 | @ IN SOA ns.local. ns.local. ( 0 86400 600 86400000 60 ) 7 | 8 | ns.local. 3600000 IN A 127.0.0.1 9 | dev.mccme.ru.local. 60 IN A 185.54.136.139 10 | -------------------------------------------------------------------------------- /lang-os/local/modprobe.conf: -------------------------------------------------------------------------------- 1 | blacklist evbug 2 | blacklist pstore 3 | blacklist efi-pstore 4 | 5 | -------------------------------------------------------------------------------- /lang-os/local/mount-partitions-brix.sh: -------------------------------------------------------------------------------- 1 | readlink -f /dev/mapper/BrixVG-Swap > /sys/power/resume 2 | swapon /dev/mapper/BrixVG-Swap 3 | 4 | mount -t ext4 /dev/mapper/BrixVG-Root /new-root 5 | mount -t btrfs /dev/mapper/BrixVG-Nix /new-root/nix 6 | 7 | mount /new-root/nix/store /new-root/nix/store -o bind,ro 8 | mount /new-root/nix/store -o remount,bind,ro 9 | 10 | mount /dev/mapper/BrixVG-Home /new-root/home 11 | mount /dev/mapper/BrixVG-Var /new-root/var 12 | 13 | yes y | mkfs.ext4 /dev/mapper/BrixVG-Tmp 14 | 15 | mount /dev/mapper/BrixVG-Tmp /new-root/tmp 16 | chmod a+rwxt /new-root/tmp 17 | 18 | mount -t vfat -L BRIXEFI /new-root/boot 19 | 20 | mount fuse -t fusectl /sys/fs/fuse/connections/ 21 | -------------------------------------------------------------------------------- /lang-os/local/mount-partitions-morefine.sh: -------------------------------------------------------------------------------- 1 | set -x 2 | 3 | readlink -f /dev/mapper/BuildBox--NVMe--Main-Swap > /sys/power/resume 4 | swapon /dev/mapper/BuildBox--NVMe--Main-Swap 5 | 6 | mount -t ext4 /dev/mapper/BuildBox--NVMe--Main-SystemRoot /new-root 7 | mount -t btrfs /dev/mapper/BuildBox--NVMe--Main-Nix /new-root/nix 8 | ls -ld /new-root/nix/store 9 | chmod a-r /new-root/nix/store 10 | ls -ld /new-root/nix/store 11 | mount /dev/mapper/BuildBox--NVMe--Main-Home /new-root/home 12 | mount /dev/mapper/BuildBox--NVMe--Main-Root /new-root/root 13 | mount /dev/mapper/BuildBox--NVMe--Main-Var /new-root/var 14 | mount /dev/mapper/BuildBox--NVMe--Main-VarDb /new-root/var/db 15 | mount /dev/mapper/BuildBox--NVMe--Main-VarLog /new-root/var/log 16 | 17 | mount /dev/mapper/BuildBox--HDD--Aux-ExperimentsData /new-root/media/ExperimentsData/ 18 | 19 | yes y | mkfs.ext4 /dev/mapper/BuildBox--NVMe--Main-Tmp 20 | 21 | mount /dev/mapper/BuildBox--NVMe--Main-Tmp /new-root/tmp 22 | chmod a+rwxt /new-root/tmp 23 | 24 | mount -t vfat -L SECOND_EFI /new-root/boot 25 | 26 | modprobe fuse 27 | 28 | mount fuse -t fusectl /sys/fs/fuse/connections/ 29 | -------------------------------------------------------------------------------- /lang-os/local/mount-partitions-thinkpad-crypt.sh: -------------------------------------------------------------------------------- 1 | set -x 2 | 3 | cryptsetup open --allow-discards /dev/disk/by-partlabel/ThinkPad-Main-Crypt ThinkPad-Main-CryptVolume 4 | 5 | udevadm trigger --action=add 6 | udevadm settle 7 | 8 | vgchange -ay 9 | 10 | udevadm trigger --action=add 11 | udevadm settle 12 | 13 | readlink -f /dev/mapper/ThinkPad--MainCrypt-Swap > /sys/power/resume 14 | swapon /dev/mapper/ThinkPad--MainCrypt-Swap 15 | 16 | mount -t ext4 /dev/mapper/ThinkPad--MainCrypt-SystemRoot /new-root 17 | mount -t btrfs /dev/mapper/ThinkPad--MainCrypt-Nix /new-root/nix 18 | ls -ld /new-root/nix/store 19 | chmod a-r /new-root/nix/store 20 | ls -ld /new-root/nix/store 21 | mount /dev/mapper/ThinkPad--MainCrypt-Home /new-root/home 22 | mount /dev/mapper/ThinkPad--MainCrypt-Root /new-root/root 23 | mount /dev/mapper/ThinkPad--MainCrypt-Var /new-root/var 24 | mount /dev/mapper/ThinkPad--MainCrypt-VarDb /new-root/var/db 25 | mount /dev/mapper/ThinkPad--MainCrypt-VarLog /new-root/var/log 26 | 27 | yes y | mkfs.ext4 /dev/mapper/ThinkPad--MainCrypt-Tmp 28 | 29 | mount /dev/mapper/ThinkPad--MainCrypt-Tmp /new-root/tmp 30 | chmod a+rwxt /new-root/tmp 31 | 32 | mount -t vfat -L TP_SSD_EFI /new-root/boot 33 | 34 | modprobe fuse 35 | 36 | mount fuse -t fusectl /sys/fs/fuse/connections/ 37 | -------------------------------------------------------------------------------- /lang-os/local/mount-partitions-thinkpad.sh: -------------------------------------------------------------------------------- 1 | set -x 2 | 3 | readlink -f /dev/mapper/ThinkPadMain-Swap > /sys/power/resume 4 | swapon /dev/mapper/ThinkPadMain-Swap 5 | 6 | mount -t ext4 /dev/mapper/ThinkPadMain-SystemRoot /new-root 7 | mount -t btrfs /dev/mapper/ThinkPadMain-Nix /new-root/nix 8 | ls -ld /new-root/nix/store 9 | chmod a-r /new-root/nix/store 10 | ls -ld /new-root/nix/store 11 | mount /dev/mapper/ThinkPadMain-Home /new-root/home 12 | mount /dev/mapper/ThinkPadMain-Root /new-root/root 13 | mount /dev/mapper/ThinkPadMain-Var /new-root/var 14 | mount /dev/mapper/ThinkPadMain-VarDb /new-root/var/db 15 | mount /dev/mapper/ThinkPadMain-VarLog /new-root/var/log 16 | 17 | yes y | mkfs.ext4 /dev/mapper/ThinkPadMain-Tmp 18 | 19 | mount /dev/mapper/ThinkPadMain-Tmp /new-root/tmp 20 | chmod a+rwxt /new-root/tmp 21 | 22 | mount -t vfat -L NIXOS_EFI /new-root/boot 23 | 24 | modprobe fuse 25 | 26 | mount fuse -t fusectl /sys/fs/fuse/connections/ 27 | -------------------------------------------------------------------------------- /lang-os/local/mount-partitions-usb-1.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | mount -t ext4 /dev/disk/by-label/LangOS_Rescue /new-root 4 | mount -t vfat /dev/disk/by-label/LOS_EFI /new-root/boot 5 | -------------------------------------------------------------------------------- /lang-os/local/mount-partitions.sh: -------------------------------------------------------------------------------- 1 | mount /dev/sda3 /new-root 2 | mount /dev/sda1 /new-root/boot 3 | 4 | -------------------------------------------------------------------------------- /lang-os/local/root-hints.url: -------------------------------------------------------------------------------- 1 | https://www.internic.net/domain/named.root 2 | -------------------------------------------------------------------------------- /lang-os/local/root-zone.url: -------------------------------------------------------------------------------- 1 | https://www.internic.net/domain/root.zone 2 | -------------------------------------------------------------------------------- /lang-os/local/system-gerbil.scm: -------------------------------------------------------------------------------- 1 | (begin (print "Hello from Gerbil. Time is ") (print (time->seconds (current-time))) (print "\n") (thread-sleep! 300)) 2 | -------------------------------------------------------------------------------- /lang-os/local/system-lisp-settings-brix.lisp: -------------------------------------------------------------------------------- 1 | (defparameter *auto-wifi* `("wlan0")) 2 | (defparameter *auto-interfaces* '("eth0")) 3 | (defparameter *auto-ip-addresses* '(("wlan0" "192.168.0.202"))) 4 | (defparameter *auto-modules* '("rtl8821ae")) 5 | 6 | (defparameter *auto-acls* `(("/dev/kvm" "u:ofborg:rwx") ("/dev/kvm" "g:nixbld:rwx"))) 7 | -------------------------------------------------------------------------------- /lang-os/local/system-lisp-settings-morefine.lisp: -------------------------------------------------------------------------------- 1 | 2 | (defparameter *auto-wifi* `()) 3 | (defparameter *auto-interfaces* '("eth0")) 4 | (defparameter *dhcp-hostname-interfaces* '("eth0")) 5 | (defparameter *auto-ip-addresses* '()) 6 | (defparameter *auto-modules* '()) 7 | 8 | (defparameter *auto-acls* `(("/dev/kvm" "g:nixbld:rwx"))) 9 | -------------------------------------------------------------------------------- /lang-os/local/tld-list.url: -------------------------------------------------------------------------------- 1 | https://data.iana.org/TLD/tlds-alpha-by-domain.txt 2 | -------------------------------------------------------------------------------- /lang-os/local/user-info.lisp: -------------------------------------------------------------------------------- 1 | (defparameter *user-info* (make-hash-table :test 'equal)) 2 | (setf (gethash (list "raskin" :owner) *user-info*) t) 3 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/aiodns.nix: -------------------------------------------------------------------------------- 1 | { lib 2 | , buildPythonPackage 3 | , fetchFromGitHub 4 | , pycares 5 | , pythonOlder 6 | , typing 7 | }: 8 | 9 | buildPythonPackage rec { 10 | pname = "aiodns"; 11 | version = "3.0.0"; 12 | disabled = pythonOlder "3.6"; 13 | 14 | src = fetchFromGitHub { 15 | owner = "saghul"; 16 | repo = pname; 17 | rev = "aiodns-${version}"; 18 | sha256 = "1i91a43gsq222r8212jn4m6bxc3fl04z1mf2h7s39nqywxkggvlp"; 19 | }; 20 | 21 | propagatedBuildInputs = [ 22 | pycares 23 | ] ++ lib.optional (pythonOlder "3.7") [ 24 | typing 25 | ]; 26 | 27 | # Could not contact DNS servers 28 | doCheck = false; 29 | 30 | pythonImportsCheck = [ "aiodns" ]; 31 | 32 | meta = with lib; { 33 | description = "Simple DNS resolver for asyncio"; 34 | homepage = "https://github.com/saghul/aiodns"; 35 | license = licenses.mit; 36 | maintainers = with maintainers; [ fab ]; 37 | }; 38 | } 39 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/aiohttp-cors.nix: -------------------------------------------------------------------------------- 1 | { lib, buildPythonPackage, fetchPypi, pythonOlder 2 | , typing ? null, aiohttp 3 | }: 4 | 5 | buildPythonPackage rec { 6 | pname = "aiohttp-cors"; 7 | version = "0.7.0"; 8 | 9 | src = fetchPypi { 10 | inherit pname version; 11 | sha256 = "0pczn54bqd32v8zhfbjfybiza6xh1szwxy6as577dn8g23bwcfad"; 12 | }; 13 | 14 | disabled = pythonOlder "3.5"; 15 | 16 | propagatedBuildInputs = [ aiohttp ] 17 | ++ lib.optional (pythonOlder "3.5") typing; 18 | 19 | # Requires network access 20 | doCheck = false; 21 | 22 | meta = with lib; { 23 | description = "CORS support for aiohttp"; 24 | homepage = "https://github.com/aio-libs/aiohttp-cors"; 25 | license = licenses.asl20; 26 | maintainers = with maintainers; [ primeos ]; 27 | }; 28 | } 29 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/aiosignal.nix: -------------------------------------------------------------------------------- 1 | { lib 2 | , buildPythonPackage 3 | , fetchFromGitHub 4 | , frozenlist 5 | , pytest-asyncio 6 | , pytestCheckHook 7 | , pythonOlder 8 | }: 9 | 10 | buildPythonPackage rec { 11 | pname = "aiosignal"; 12 | version = "1.2.0"; 13 | disabled = pythonOlder "3.6"; 14 | 15 | src = fetchFromGitHub { 16 | owner = "aio-libs"; 17 | repo = pname; 18 | rev = "v${version}"; 19 | sha256 = "1pamfc2l95s1q86jvmbp17chjy129gk01kwy8xm88d2ijy8s1caq"; 20 | }; 21 | 22 | propagatedBuildInputs = [ 23 | frozenlist 24 | ]; 25 | 26 | checkInputs = [ 27 | pytest-asyncio 28 | pytestCheckHook 29 | ]; 30 | 31 | postPatch = '' 32 | substituteInPlace pytest.ini \ 33 | --replace "--cov=aiosignal" "" 34 | ''; 35 | 36 | pythonImportsCheck = [ "aiosignal" ]; 37 | 38 | meta = with lib; { 39 | description = "Python list of registered asynchronous callbacks"; 40 | homepage = "https://github.com/aio-libs/aiosignal"; 41 | license = with licenses; [ asl20 ]; 42 | maintainers = with maintainers; [ fab ]; 43 | }; 44 | } 45 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/appdirs.nix: -------------------------------------------------------------------------------- 1 | { lib 2 | , buildPythonPackage 3 | , fetchPypi 4 | }: 5 | 6 | buildPythonPackage rec { 7 | pname = "appdirs"; 8 | version = "1.4.4"; 9 | 10 | src = fetchPypi { 11 | inherit pname version; 12 | sha256 = "7d5d0167b2b1ba821647616af46a749d1c653740dd0d2415100fe26e27afdf41"; 13 | }; 14 | 15 | meta = { 16 | description = "A python module for determining appropriate platform-specific dirs"; 17 | homepage = "https://github.com/ActiveState/appdirs"; 18 | license = lib.licenses.mit; 19 | }; 20 | } 21 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/async-timeout.nix: -------------------------------------------------------------------------------- 1 | { lib 2 | , fetchPypi 3 | , buildPythonPackage 4 | , pythonOlder 5 | , typing-extensions 6 | }: 7 | 8 | buildPythonPackage rec { 9 | pname = "async-timeout"; 10 | version = "4.0.1"; 11 | 12 | disabled = pythonOlder "3.6"; 13 | 14 | src = fetchPypi { 15 | inherit pname version; 16 | sha256 = "sha256-uTDLFho5BC+SIvbvtzATmch+6rOUcn7FQ3kko21u71E="; 17 | }; 18 | 19 | propagatedBuildInputs = [ 20 | typing-extensions 21 | ]; 22 | 23 | # Circular dependency on aiohttp 24 | doCheck = false; 25 | 26 | meta = { 27 | description = "Timeout context manager for asyncio programs"; 28 | homepage = "https://github.com/aio-libs/async_timeout/"; 29 | license = lib.licenses.asl20; 30 | }; 31 | } 32 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/async_generator.nix: -------------------------------------------------------------------------------- 1 | { lib, buildPythonPackage, fetchPypi, pythonOlder, isPy35, pytest, pytest-asyncio }: 2 | 3 | buildPythonPackage rec { 4 | pname = "async_generator"; 5 | version = "1.10"; 6 | 7 | disabled = pythonOlder "3.5"; 8 | 9 | src = fetchPypi { 10 | inherit pname version; 11 | sha256 = "6ebb3d106c12920aaae42ccb6f787ef5eefdcdd166ea3d628fa8476abe712144"; 12 | }; 13 | 14 | checkInputs = [ pytest pytest-asyncio ]; 15 | 16 | checkPhase = '' 17 | pytest -W error -ra -v --pyargs async_generator 18 | ''; 19 | 20 | # disable tests on python3.5 to avoid circular dependency with pytest-asyncio 21 | doCheck = !isPy35; 22 | 23 | meta = with lib; { 24 | description = "Async generators and context managers for Python 3.5+"; 25 | homepage = "https://github.com/python-trio/async_generator"; 26 | license = with licenses; [ mit asl20 ]; 27 | }; 28 | } 29 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/asynctest.nix: -------------------------------------------------------------------------------- 1 | { lib, buildPythonPackage, fetchPypi, pythonOlder, python }: 2 | 3 | buildPythonPackage rec { 4 | pname = "asynctest"; 5 | version = "0.13.0"; 6 | 7 | disabled = pythonOlder "3.5"; 8 | 9 | src = fetchPypi { 10 | inherit pname version; 11 | sha256 = "1b3zsy7p84gag6q8ai2ylyrhx213qdk2h2zb6im3xn0m5n264y62"; 12 | }; 13 | 14 | postPatch = '' 15 | # Skip failing test, probably caused by file system access 16 | substituteInPlace test/test_selector.py \ 17 | --replace "test_events_watched_outside_test_are_ignored" "xtest_events_watched_outside_test_are_ignored" 18 | ''; 19 | 20 | # https://github.com/Martiusweb/asynctest/issues/132 21 | doCheck = pythonOlder "3.7"; 22 | 23 | checkPhase = '' 24 | ${python.interpreter} -m unittest test 25 | ''; 26 | 27 | meta = with lib; { 28 | description = "Enhance the standard unittest package with features for testing asyncio libraries"; 29 | homepage = "https://github.com/Martiusweb/asynctest"; 30 | license = licenses.asl20; 31 | maintainers = with maintainers; [ dotlambda ]; 32 | }; 33 | } 34 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/atomicwrites.nix: -------------------------------------------------------------------------------- 1 | { lib, buildPythonPackage, fetchPypi, pytest }: 2 | 3 | buildPythonPackage rec { 4 | pname = "atomicwrites"; 5 | version = "1.4.0"; 6 | 7 | src = fetchPypi { 8 | inherit pname version; 9 | sha256 = "ae70396ad1a434f9c7046fd2dd196fc04b12f9e91ffb859164193be8b6168a7a"; 10 | }; 11 | 12 | # Tests depend on pytest but atomicwrites is a dependency of pytest 13 | doCheck = false; 14 | checkInputs = [ pytest ]; 15 | 16 | meta = with lib; { 17 | description = "Atomic file writes on POSIX"; 18 | homepage = "https://pypi.python.org/pypi/atomicwrites"; 19 | maintainers = with maintainers; [ matthiasbeyer ]; 20 | }; 21 | } 22 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/attrs.nix: -------------------------------------------------------------------------------- 1 | { lib 2 | , callPackage 3 | , buildPythonPackage 4 | , fetchPypi 5 | }: 6 | 7 | buildPythonPackage rec { 8 | pname = "attrs"; 9 | version = "21.2.0"; 10 | 11 | src = fetchPypi { 12 | inherit pname version; 13 | sha256 = "ef6aaac3ca6cd92904cdd0d83f629a15f18053ec84e6432106f7a4d04ae4f5fb"; 14 | }; 15 | 16 | outputs = [ "out" "testout" ]; 17 | 18 | postInstall = '' 19 | # Install tests as the tests output. 20 | mkdir $testout 21 | cp -R tests $testout/tests 22 | ''; 23 | 24 | pythonImportsCheck = [ "attr" ]; 25 | 26 | # pytest depends on attrs, so we can't do this out-of-the-box. 27 | # Instead, we do this as a passthru.tests test. 28 | doCheck = false; 29 | 30 | passthru.tests = { 31 | pytest = callPackage ./tests.nix { }; 32 | }; 33 | 34 | meta = with lib; { 35 | description = "Python attributes without boilerplate"; 36 | homepage = "https://github.com/hynek/attrs"; 37 | license = licenses.mit; 38 | }; 39 | } 40 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/backports_functools_lru_cache.nix: -------------------------------------------------------------------------------- 1 | { lib 2 | , buildPythonPackage 3 | , fetchPypi 4 | , setuptools-scm 5 | , isPy3k 6 | , pytest 7 | , pytest-black 8 | , pytest-flake8 9 | , pytest-cov 10 | }: 11 | 12 | buildPythonPackage rec { 13 | pname = "backports.functools_lru_cache"; 14 | version = "1.6.4"; 15 | 16 | src = fetchPypi { 17 | inherit pname version; 18 | sha256 = "d5ed2169378b67d3c545e5600d363a923b09c456dab1593914935a68ad478271"; 19 | }; 20 | 21 | nativeBuildInputs = [ setuptools-scm ]; 22 | 23 | checkInputs = [ pytest pytest-flake8 pytest-black pytest-cov ]; 24 | # ironically, they fail a linting test, and pytest.ini forces that test suite 25 | checkPhase = '' 26 | rm backports/functools_lru_cache.py 27 | pytest -k 'not format' 28 | ''; 29 | 30 | # Test fail on Python 2 31 | doCheck = isPy3k; 32 | 33 | pythonNamespaces = [ "backports" ]; 34 | 35 | meta = { 36 | description = "Backport of functools.lru_cache"; 37 | homepage = "https://github.com/jaraco/backports.functools_lru_cache"; 38 | license = lib.licenses.mit; 39 | }; 40 | } 41 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/blessings.nix: -------------------------------------------------------------------------------- 1 | { lib 2 | , buildPythonPackage 3 | , fetchPypi 4 | , six 5 | , nose 6 | }: 7 | 8 | buildPythonPackage rec { 9 | pname = "blessings"; 10 | version = "1.7"; 11 | 12 | src = fetchPypi { 13 | inherit pname version; 14 | sha256 = "98e5854d805f50a5b58ac2333411b0482516a8210f23f43308baeb58d77c157d"; 15 | }; 16 | 17 | # 4 failing tests, 2to3 18 | doCheck = false; 19 | 20 | propagatedBuildInputs = [ six ]; 21 | checkInputs = [ nose ]; 22 | 23 | checkPhase = '' 24 | nosetests 25 | ''; 26 | 27 | meta = with lib; { 28 | homepage = "https://github.com/erikrose/blessings"; 29 | description = "A thin, practical wrapper around terminal coloring, styling, and positioning"; 30 | license = licenses.mit; 31 | maintainers = with maintainers; [ domenkozar ]; 32 | }; 33 | 34 | } 35 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/browsermob-proxy.nix: -------------------------------------------------------------------------------- 1 | { lib 2 | , buildPythonPackage 3 | , fetchPypi 4 | , requests 5 | , urllib3 6 | }: 7 | 8 | buildPythonPackage rec { 9 | pname = "browsermob-proxy"; 10 | version = "0.8.0"; 11 | 12 | src = fetchPypi { 13 | inherit pname version; 14 | sha256 = "1bxvmghm834gsfz3pm69772wzhh15p8ci526b25dpk3z4315nd7v"; 15 | }; 16 | 17 | propagatedBuildInputs = [ (requests.override { urllib3 = urllib3.override { 18 | pyopenssl = null; 19 | cryptography = null; 20 | };}) ]; 21 | 22 | meta = { 23 | description = "A library for interacting with Browsermob Proxy"; 24 | homepage = "http://oss.theautomatedtester.co.uk/browsermob-proxy-py"; 25 | license = lib.licenses.asl20; 26 | maintainers = with lib.maintainers; [ raskin ]; 27 | }; 28 | } 29 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/cchardet.nix: -------------------------------------------------------------------------------- 1 | { lib 2 | , buildPythonPackage 3 | , fetchPypi 4 | , python 5 | , nose 6 | }: 7 | 8 | buildPythonPackage rec { 9 | pname = "cchardet"; 10 | version = "2.1.7"; 11 | 12 | src = fetchPypi { 13 | inherit pname version; 14 | sha256 = "c428b6336545053c2589f6caf24ea32276c6664cb86db817e03a94c60afa0eaf"; 15 | }; 16 | 17 | checkInputs = [ nose ]; 18 | checkPhase = '' 19 | ${python.interpreter} setup.py nosetests 20 | ''; 21 | 22 | meta = { 23 | description = "High-speed universal character encoding detector"; 24 | homepage = "https://github.com/PyYoshi/cChardet"; 25 | license = lib.licenses.mpl11; 26 | maintainers = with lib.maintainers; [ ivan ]; 27 | }; 28 | } 29 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/certifi.nix: -------------------------------------------------------------------------------- 1 | { lib 2 | , fetchPypi 3 | , buildPythonPackage 4 | }: 5 | 6 | buildPythonPackage rec { 7 | pname = "certifi"; 8 | version = "2020.12.5"; 9 | 10 | src = fetchPypi { 11 | inherit pname version; 12 | sha256 = "177mdbw0livdjvp17sz6wsfrc32838m9y59v871gpgv2888raj8s"; 13 | }; 14 | 15 | pythonImportsCheck = [ "certifi" ]; 16 | 17 | dontUseSetuptoolsCheck = true; 18 | 19 | meta = { 20 | homepage = "https://certifi.io/"; 21 | description = "Python package for providing Mozilla's CA Bundle"; 22 | license = lib.licenses.isc; 23 | maintainers = with lib.maintainers; [ koral ]; 24 | }; 25 | } 26 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/chardet.nix: -------------------------------------------------------------------------------- 1 | { lib, buildPythonPackage, fetchPypi, fetchpatch 2 | , pytest, pytest-runner, hypothesis }: 3 | 4 | buildPythonPackage rec { 5 | pname = "chardet"; 6 | version = "3.0.4"; 7 | 8 | src = fetchPypi { 9 | inherit pname version; 10 | sha256 = "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"; 11 | }; 12 | 13 | patches = [ 14 | # Add pytest 4 support. See: https://github.com/chardet/chardet/pull/174 15 | (fetchpatch { 16 | url = "https://github.com/chardet/chardet/commit/0561ddcedcd12ea1f98b7ddedb93686ed8a5ffa4.patch"; 17 | sha256 = "1y1xhjf32rdhq9sfz58pghwv794f3w2f2qcn8p6hp4pc8jsdrn2q"; 18 | }) 19 | ]; 20 | 21 | checkInputs = [ pytest pytest-runner hypothesis ]; 22 | 23 | meta = with lib; { 24 | homepage = "https://github.com/chardet/chardet"; 25 | description = "Universal encoding detector"; 26 | license = licenses.lgpl2; 27 | maintainers = with maintainers; [ domenkozar ]; 28 | }; 29 | } 30 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/charset-normalizer.nix: -------------------------------------------------------------------------------- 1 | { lib 2 | , buildPythonPackage 3 | , fetchFromGitHub 4 | , pytestCheckHook 5 | }: 6 | 7 | buildPythonPackage rec { 8 | pname = "charset-normalizer"; 9 | version = "2.0.8"; 10 | 11 | src = fetchFromGitHub { 12 | owner = "Ousret"; 13 | repo = "charset_normalizer"; 14 | rev = version; 15 | sha256 = "sha256-+acnzdDcujnMa0FYlWaAX7Ga9APMRlvBLKoogIyY8YM="; 16 | }; 17 | 18 | checkInputs = [ 19 | pytestCheckHook 20 | ]; 21 | 22 | postPatch = '' 23 | substituteInPlace setup.cfg \ 24 | --replace " --cov=charset_normalizer --cov-report=term-missing" "" 25 | ''; 26 | 27 | pythonImportsCheck = [ "charset_normalizer" ]; 28 | 29 | meta = with lib; { 30 | description = "Python module for encoding and language detection"; 31 | homepage = "https://charset-normalizer.readthedocs.io/"; 32 | license = licenses.mit; 33 | maintainers = with maintainers; [ fab ]; 34 | }; 35 | } 36 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/colorama.nix: -------------------------------------------------------------------------------- 1 | { lib, fetchPypi, buildPythonPackage }: 2 | 3 | buildPythonPackage rec { 4 | pname = "colorama"; 5 | version = "0.4.4"; 6 | 7 | src = fetchPypi { 8 | inherit pname version; 9 | sha256 = "5941b2b48a20143d2267e95b1c2a7603ce057ee39fd88e7329b0c292aa16869b"; 10 | }; 11 | 12 | # No tests in archive 13 | doCheck = false; 14 | 15 | meta = with lib; { 16 | homepage = "https://github.com/tartley/colorama"; 17 | license = licenses.bsd3; 18 | description = "Cross-platform colored terminal text"; 19 | }; 20 | } 21 | 22 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/configparser.nix: -------------------------------------------------------------------------------- 1 | { lib, stdenv, buildPythonPackage, fetchPypi, setuptools-scm }: 2 | 3 | buildPythonPackage rec { 4 | pname = "configparser"; 5 | version = "4.0.2"; 6 | 7 | src = fetchPypi { 8 | inherit pname version; 9 | sha256 = "c7d282687a5308319bf3d2e7706e575c635b0a470342641c93bea0ea3b5331df"; 10 | }; 11 | 12 | # No tests available 13 | doCheck = false; 14 | 15 | nativeBuildInputs = [ setuptools-scm ]; 16 | 17 | preConfigure = '' 18 | export LC_ALL=${if stdenv.isDarwin then "en_US" else "C"}.UTF-8 19 | ''; 20 | 21 | meta = with lib; { 22 | description = "Updated configparser from Python 3.7 for Python 2.6+."; 23 | license = licenses.mit; 24 | homepage = "https://github.com/jaraco/configparser"; 25 | }; 26 | } 27 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/contextlibe2.nix: -------------------------------------------------------------------------------- 1 | { lib 2 | , buildPythonPackage 3 | , fetchPypi 4 | , unittest2 5 | }: 6 | 7 | buildPythonPackage rec { 8 | pname = "contextlib2"; 9 | version = "0.6.0.post1"; 10 | 11 | src = fetchPypi { 12 | inherit pname version; 13 | sha256 = "01f490098c18b19d2bd5bb5dc445b2054d2fa97f09a4280ba2c5f3c394c8162e"; 14 | }; 15 | 16 | checkInputs = [ unittest2 ]; 17 | 18 | meta = { 19 | description = "Backports and enhancements for the contextlib module"; 20 | homepage = "https://contextlib2.readthedocs.org/"; 21 | license = lib.licenses.psfl; 22 | }; 23 | } 24 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/cookies.nix: -------------------------------------------------------------------------------- 1 | { lib, buildPythonPackage, fetchPypi }: 2 | 3 | buildPythonPackage rec { 4 | pname = "cookies"; 5 | version = "2.2.1"; 6 | 7 | src = fetchPypi { 8 | inherit pname version; 9 | sha256 = "13pfndz8vbk4p2a44cfbjsypjarkrall71pgc97glk5fiiw9idnn"; 10 | }; 11 | 12 | doCheck = false; 13 | 14 | meta = with lib; { 15 | description = "Friendlier RFC 6265-compliant cookie parser/renderer"; 16 | homepage = "https://github.com/sashahart/cookies"; 17 | license = licenses.mit; 18 | }; 19 | } 20 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/coverage.nix: -------------------------------------------------------------------------------- 1 | { lib 2 | , buildPythonPackage 3 | , fetchPypi 4 | , mock 5 | }: 6 | 7 | buildPythonPackage rec { 8 | pname = "coverage"; 9 | version = "5.5"; 10 | 11 | src = fetchPypi { 12 | inherit pname version; 13 | sha256 = "ebe78fe9a0e874362175b02371bdfbee64d8edc42a044253ddf4ee7d3c15212c"; 14 | }; 15 | 16 | # No tests in archive 17 | doCheck = false; 18 | checkInputs = [ mock ]; 19 | 20 | meta = { 21 | description = "Code coverage measurement for python"; 22 | homepage = "http://nedbatchelder.com/code/coverage/"; 23 | license = lib.licenses.bsd3; 24 | }; 25 | } 26 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/cryptography-py27-warning.patch: -------------------------------------------------------------------------------- 1 | Delete the warning that breaks tests of dependent projects. 2 | 3 | --- a/src/cryptography/__init__.py 4 | +++ b/src/cryptography/__init__.py 5 | @@ -33,9 +32,0 @@ __all__ = [ 6 | - 7 | -if sys.version_info[0] == 2: 8 | - warnings.warn( 9 | - "Python 2 is no longer supported by the Python core team. Support for " 10 | - "it is now deprecated in cryptography, and will be removed in the " 11 | - "next release.", 12 | - CryptographyDeprecationWarning, 13 | - stacklevel=2, 14 | - ) 15 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/cryptography-vectors.nix: -------------------------------------------------------------------------------- 1 | { buildPythonPackage, fetchPypi, lib, cryptography }: 2 | 3 | buildPythonPackage rec { 4 | pname = "cryptography_vectors"; 5 | # The test vectors must have the same version as the cryptography package: 6 | version = cryptography.version; 7 | 8 | src = fetchPypi { 9 | inherit pname version; 10 | sha256 = "1yhaps0f3h2yjb6lmz953z1l1d84y9swk4k3gj9nqyk4vbx5m7cc"; 11 | }; 12 | 13 | # No tests included 14 | doCheck = false; 15 | 16 | meta = with lib; { 17 | description = "Test vectors for the cryptography package"; 18 | homepage = "https://cryptography.io/en/latest/development/test-vectors/"; 19 | # Source: https://github.com/pyca/cryptography/tree/master/vectors; 20 | license = with licenses; [ asl20 bsd3 ]; 21 | maintainers = with maintainers; [ primeos ]; 22 | }; 23 | } 24 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/dataclasses.nix: -------------------------------------------------------------------------------- 1 | { lib, buildPythonPackage, fetchPypi, isPy36 }: 2 | 3 | buildPythonPackage rec { 4 | pname = "dataclasses"; 5 | version = "0.8"; 6 | 7 | # backport only works on Python 3.6, and is in the standard library in Python 3.7 8 | disabled = !isPy36; 9 | 10 | src = fetchPypi { 11 | inherit pname version; 12 | sha256 = "8479067f342acf957dc82ec415d355ab5edb7e7646b90dc6e2fd1d96ad084c97"; 13 | }; 14 | 15 | meta = with lib; { 16 | description = "An implementation of PEP 557: Data Classes"; 17 | homepage = "https://github.com/ericvsmith/dataclasses"; 18 | license = licenses.asl20; 19 | maintainers = with maintainers; [ catern ]; 20 | }; 21 | } 22 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/dateutil.nix: -------------------------------------------------------------------------------- 1 | { lib 2 | , buildPythonPackage 3 | , fetchPypi 4 | , setuptools-scm 5 | , six 6 | }: 7 | 8 | buildPythonPackage rec { 9 | pname = "python-dateutil"; 10 | version = "2.8.2"; 11 | 12 | src = fetchPypi { 13 | inherit pname version; 14 | sha256 = "sha256-ASPKzBYnrhnd88J6XeW9Z+5FhvvdZEDZdI+Ku0g9PoY="; 15 | }; 16 | 17 | nativeBuildInputs = [ setuptools-scm ]; 18 | 19 | propagatedBuildInputs = [ six ]; 20 | 21 | # cyclic dependency: tests need freezegun, which depends on python-dateutil 22 | doCheck = false; 23 | 24 | pythonImportsCheck = [ 25 | "dateutil.easter" 26 | "dateutil.parser" 27 | "dateutil.relativedelta" 28 | "dateutil.rrule" 29 | "dateutil.tz" 30 | "dateutil.utils" 31 | "dateutil.zoneinfo" 32 | ]; 33 | 34 | meta = with lib; { 35 | description = "Powerful extensions to the standard datetime module"; 36 | homepage = "https://github.com/dateutil/dateutil/"; 37 | license = with licenses; [ asl20 bsd3 ]; 38 | maintainers = with maintainers; [ dotlambda ]; 39 | }; 40 | } 41 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/default.nix: -------------------------------------------------------------------------------- 1 | { lib 2 | , buildPythonPackage 3 | , fetchPypi 4 | , isPy3k 5 | , mozprofile 6 | , mozversion 7 | , moztest 8 | , manifestparser 9 | , marionette_driver 10 | , browsermob-proxy 11 | , wptserve 12 | }: 13 | 14 | buildPythonPackage rec { 15 | pname = "marionette-harness"; 16 | version = "5.0.0"; 17 | disabled = isPy3k; 18 | 19 | src = fetchPypi { 20 | inherit pname version; 21 | sha256 = "041cd779ae383fb5c56f2bb44824f4e80ba895febd9a3f21570ac274221c82e0"; 22 | }; 23 | 24 | propagatedBuildInputs = [ mozprofile mozversion browsermob-proxy moztest 25 | wptserve manifestparser marionette_driver ]; 26 | 27 | meta = { 28 | description = "Mozilla Marionette protocol test automation harness"; 29 | homepage = "https://developer.mozilla.org/en-US/docs/Mozilla/QA/Marionette"; 30 | license = lib.licenses.mpl20; 31 | maintainers = with lib.maintainers; [ raskin ]; 32 | }; 33 | } 34 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/enum34.nix: -------------------------------------------------------------------------------- 1 | { lib 2 | , buildPythonPackage 3 | , fetchPypi 4 | , pythonAtLeast 5 | , python 6 | }: 7 | 8 | if pythonAtLeast "3.4" then null else buildPythonPackage rec { 9 | pname = "enum34"; 10 | version = "1.1.10"; 11 | 12 | src = fetchPypi { 13 | inherit pname version; 14 | sha256 = "cce6a7477ed816bd2542d03d53db9f0db935dd013b70f336a95c73979289f248"; 15 | }; 16 | 17 | checkPhase = '' 18 | ${python.interpreter} -m unittest discover 19 | ''; 20 | 21 | meta = with lib; { 22 | homepage = "https://pypi.python.org/pypi/enum34"; 23 | description = "Python 3.4 Enum backported to 3.3, 3.2, 3.1, 2.7, 2.6, 2.5, and 2.4"; 24 | license = licenses.bsd0; 25 | }; 26 | 27 | } 28 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/execnet.nix: -------------------------------------------------------------------------------- 1 | { lib 2 | , buildPythonPackage 3 | , isPyPy 4 | , fetchPypi 5 | , pytestCheckHook 6 | , setuptools-scm 7 | , apipkg 8 | }: 9 | 10 | buildPythonPackage rec { 11 | pname = "execnet"; 12 | version = "1.9.0"; 13 | 14 | src = fetchPypi { 15 | inherit pname version; 16 | sha256 = "8f694f3ba9cc92cab508b152dcfe322153975c29bda272e2fd7f3f00f36e47c5"; 17 | }; 18 | 19 | checkInputs = [ pytestCheckHook ]; 20 | nativeBuildInputs = [ setuptools-scm ]; 21 | propagatedBuildInputs = [ apipkg ]; 22 | 23 | # remove vbox tests 24 | postPatch = '' 25 | rm -v testing/test_termination.py 26 | rm -v testing/test_channel.py 27 | rm -v testing/test_xspec.py 28 | rm -v testing/test_gateway.py 29 | ${lib.optionalString isPyPy "rm -v testing/test_multi.py"} 30 | ''; 31 | 32 | pythonImportsCheck = [ "execnet" ]; 33 | 34 | __darwinAllowLocalNetworking = true; 35 | 36 | meta = with lib; { 37 | description = "Distributed Python deployment and communication"; 38 | license = licenses.mit; 39 | homepage = "https://execnet.readthedocs.io/"; 40 | maintainers = with maintainers; [ ]; 41 | }; 42 | 43 | } 44 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/filelock.nix: -------------------------------------------------------------------------------- 1 | { lib, buildPythonPackage, fetchPypi }: 2 | 3 | buildPythonPackage rec { 4 | pname = "filelock"; 5 | version = "3.2.1"; 6 | 7 | src = fetchPypi { 8 | inherit pname version; 9 | sha256 = "1qry67zv2pmz8px6wdfbjqv75nmryy2ac7asqgs6q6db2722kpcw"; 10 | }; 11 | 12 | meta = with lib; { 13 | homepage = "https://github.com/benediktschmitt/py-filelock"; 14 | description = "A platform independent file lock for Python"; 15 | license = licenses.unlicense; 16 | maintainers = with maintainers; [ henkkalkwater ]; 17 | }; 18 | } 19 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/flaky.nix: -------------------------------------------------------------------------------- 1 | { lib 2 | , buildPythonPackage 3 | , fetchPypi 4 | , mock 5 | , nose 6 | , pytest 7 | }: 8 | 9 | buildPythonPackage rec { 10 | pname = "flaky"; 11 | version = "3.7.0"; 12 | 13 | src = fetchPypi { 14 | inherit pname version; 15 | sha256 = "3ad100780721a1911f57a165809b7ea265a7863305acb66708220820caf8aa0d"; 16 | }; 17 | 18 | checkInputs = [ mock nose pytest ]; 19 | nativeCheckInputs = [ pytest nose ]; 20 | 21 | checkPhase = '' 22 | # based on tox.ini 23 | pytest -k 'example and not options' --doctest-modules test/test_pytest/ 24 | pytest -k 'example and not options' test/test_pytest/ 25 | pytest -p no:flaky test/test_pytest/test_flaky_pytest_plugin.py 26 | nosetests --with-flaky --force-flaky --max-runs 2 test/test_nose/test_nose_options_example.py 27 | pytest --force-flaky --max-runs 2 test/test_pytest/test_pytest_options_example.py 28 | ''; 29 | 30 | meta = with lib; { 31 | homepage = "https://github.com/box/flaky"; 32 | description = "Plugin for nose or py.test that automatically reruns flaky tests"; 33 | license = licenses.asl20; 34 | }; 35 | 36 | } 37 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/flit-core.nix: -------------------------------------------------------------------------------- 1 | { lib 2 | , buildPythonPackage 3 | , callPackage 4 | , flit 5 | , toml 6 | }: 7 | 8 | buildPythonPackage rec { 9 | pname = "flit-core"; 10 | version = "3.2.0"; 11 | format = "pyproject"; 12 | 13 | outputs = [ 14 | "out" 15 | "testsout" 16 | ]; 17 | 18 | inherit (flit) src patches; 19 | 20 | preConfigure = '' 21 | cd flit_core 22 | ''; 23 | 24 | propagatedBuildInputs = [ 25 | toml 26 | ]; 27 | 28 | postInstall = '' 29 | mkdir $testsout 30 | cp -R ../tests $testsout/tests 31 | ''; 32 | 33 | # check in passthru.tests.pytest to escape infinite recursion with setuptools-scm 34 | doCheck = false; 35 | 36 | passthru.tests = { 37 | inherit flit; 38 | pytest = callPackage ./tests.nix { }; 39 | }; 40 | 41 | meta = with lib; { 42 | description = "Distribution-building parts of Flit. See flit package for more information"; 43 | homepage = "https://github.com/takluyver/flit"; 44 | license = licenses.bsd3; 45 | maintainers = with maintainers; [ fridh SuperSandro2000 ]; 46 | }; 47 | } 48 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/freezegun.nix: -------------------------------------------------------------------------------- 1 | { lib 2 | , buildPythonPackage 3 | , fetchPypi 4 | , python-dateutil 5 | , six 6 | , mock 7 | , nose 8 | , pytest 9 | }: 10 | 11 | buildPythonPackage rec { 12 | pname = "freezegun"; 13 | version = "0.3.15"; 14 | 15 | src = fetchPypi { 16 | inherit pname version; 17 | sha256 = "e2062f2c7f95cc276a834c22f1a17179467176b624cc6f936e8bc3be5535ad1b"; 18 | }; 19 | 20 | propagatedBuildInputs = [ python-dateutil six ]; 21 | checkInputs = [ mock nose pytest ]; 22 | 23 | meta = with lib; { 24 | description = "FreezeGun: Let your Python tests travel through time"; 25 | homepage = "https://github.com/spulec/freezegun"; 26 | license = licenses.asl20; 27 | }; 28 | 29 | } 30 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/frozenlist.nix: -------------------------------------------------------------------------------- 1 | { lib 2 | , buildPythonPackage 3 | , cython 4 | , fetchFromGitHub 5 | , pytestCheckHook 6 | , pythonOlder 7 | }: 8 | 9 | buildPythonPackage rec { 10 | pname = "frozenlist"; 11 | version = "1.2.0"; 12 | disabled = pythonOlder "3.6"; 13 | 14 | src = fetchFromGitHub { 15 | owner = "aio-libs"; 16 | repo = pname; 17 | rev = "v${version}"; 18 | sha256 = "sha256-rTbekdceC5QK0aiySi/4QUwaEoDfTlLrx2t6Kb9bH7U="; 19 | }; 20 | 21 | nativeBuildInputs = [ 22 | cython 23 | ]; 24 | 25 | checkInputs = [ 26 | pytestCheckHook 27 | ]; 28 | 29 | postPatch = '' 30 | substituteInPlace pytest.ini \ 31 | --replace "--cov=frozenlist" "" 32 | ''; 33 | 34 | preBuild = '' 35 | cython frozenlist/_frozenlist.pyx 36 | ''; 37 | 38 | pythonImportsCheck = [ "frozenlist" ]; 39 | 40 | meta = with lib; { 41 | description = "Python module for list-like structure"; 42 | homepage = "https://github.com/aio-libs/frozenlist"; 43 | license = with licenses; [ asl20 ]; 44 | maintainers = with maintainers; [ fab ]; 45 | }; 46 | } 47 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/funcsigs.nix: -------------------------------------------------------------------------------- 1 | { lib, buildPythonPackage, fetchPypi 2 | , isPyPy, isPy3k, unittest2 3 | }: 4 | 5 | buildPythonPackage rec { 6 | pname = "funcsigs"; 7 | version = "1.0.2"; 8 | 9 | src = fetchPypi { 10 | inherit pname version; 11 | sha256 = "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"; 12 | }; 13 | 14 | buildInputs = [ unittest2 ]; 15 | 16 | # https://github.com/testing-cabal/funcsigs/issues/10 17 | patches = lib.optional (isPyPy && isPy3k) [ ./fix-pypy3-tests.patch ]; 18 | 19 | meta = with lib; { 20 | description = "Python function signatures from PEP362 for Python 2.6, 2.7 and 3.2+"; 21 | homepage = "https://github.com/aliles/funcsigs"; 22 | maintainers = with maintainers; [ ]; 23 | license = licenses.asl20; 24 | }; 25 | } 26 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/functools32.nix: -------------------------------------------------------------------------------- 1 | { lib 2 | , buildPythonPackage 3 | , fetchPypi 4 | , isPy3k 5 | }: 6 | 7 | if isPy3k then null else buildPythonPackage rec { 8 | pname = "functools32"; 9 | version = "3.2.3-2"; 10 | 11 | src = fetchPypi { 12 | inherit pname version; 13 | sha256 = "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"; 14 | }; 15 | 16 | meta = with lib; { 17 | description = "This is a backport of the functools standard library module from"; 18 | homepage = "https://github.com/MiCHiLU/python-functools32"; 19 | license = licenses.psfl; 20 | }; 21 | 22 | } 23 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/gunicorn.nix: -------------------------------------------------------------------------------- 1 | { lib, buildPythonPackage, fetchPypi 2 | , coverage 3 | , mock 4 | , pytest 5 | , pytest-cov 6 | , setuptools 7 | }: 8 | 9 | buildPythonPackage rec { 10 | pname = "gunicorn"; 11 | version = "19.10.0"; 12 | 13 | src = fetchPypi { 14 | inherit pname version; 15 | sha256 = "1080jk1ly8j0rc6lv8i33sj94rxjaskd1732cdq5chdqb3ij9ppr"; 16 | }; 17 | 18 | propagatedBuildInputs = [ setuptools ]; 19 | 20 | checkInputs = [ pytest mock pytest-cov coverage ]; 21 | 22 | prePatch = '' 23 | substituteInPlace requirements_test.txt --replace "==" ">=" \ 24 | --replace "coverage>=4.0,<4.4" "coverage" 25 | ''; 26 | 27 | # better than no tests 28 | checkPhase = '' 29 | $out/bin/gunicorn --help > /dev/null 30 | ''; 31 | 32 | pythonImportsCheck = [ "gunicorn" ]; 33 | 34 | meta = with lib; { 35 | homepage = "https://github.com/benoitc/gunicorn"; 36 | description = "WSGI HTTP Server for UNIX"; 37 | license = licenses.mit; 38 | }; 39 | } 40 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/h2.nix: -------------------------------------------------------------------------------- 1 | { stdenv, lib, buildPythonPackage, fetchPypi 2 | , enum34, hpack, hyperframe }: 3 | 4 | buildPythonPackage rec { 5 | pname = "h2"; 6 | version = "3.2.0"; 7 | 8 | src = fetchPypi { 9 | inherit pname version; 10 | sha256 = "051gg30aca26rdxsmr9svwqm06pdz9bv21ch4n0lgi7jsvml2pw7"; 11 | }; 12 | 13 | propagatedBuildInputs = [ enum34 hpack hyperframe ]; 14 | 15 | meta = with lib; { 16 | description = "HTTP/2 State-Machine based protocol implementation"; 17 | homepage = "http://hyper.rtfd.org/"; 18 | license = licenses.mit; 19 | }; 20 | } 21 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/hpack.nix: -------------------------------------------------------------------------------- 1 | 2 | { stdenv, lib 3 | , buildPythonPackage 4 | , fetchPypi 5 | }: 6 | 7 | buildPythonPackage rec { 8 | pname = "hpack"; 9 | version = "3.0.0"; 10 | 11 | src = fetchPypi { 12 | inherit pname version; 13 | sha256 = "8eec9c1f4bfae3408a3f30500261f7e6a65912dc138526ea054f9ad98892e9d2"; 14 | }; 15 | 16 | meta = with lib; { 17 | description = "Pure-Python HPACK header compression"; 18 | homepage = "http://hyper.rtfd.org"; 19 | license = licenses.mit; 20 | }; 21 | 22 | } 23 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/hyperframe.nix: -------------------------------------------------------------------------------- 1 | { stdenv, lib, buildPythonPackage, fetchPypi }: 2 | buildPythonPackage rec { 3 | pname = "hyperframe"; 4 | version = "5.2.0"; 5 | 6 | src = fetchPypi { 7 | inherit pname version; 8 | sha256 = "a9f5c17f2cc3c719b917c4f33ed1c61bd1f8dfac4b1bd23b7c80b3400971b41f"; 9 | }; 10 | 11 | meta = with lib; { 12 | description = "HTTP/2 framing layer for Python"; 13 | homepage = "http://hyper.rtfd.org/"; 14 | license = licenses.mit; 15 | }; 16 | } 17 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/idna-ssl.nix: -------------------------------------------------------------------------------- 1 | { lib, buildPythonPackage, fetchPypi, idna }: 2 | 3 | buildPythonPackage rec { 4 | pname = "idna-ssl"; 5 | version = "1.1.0"; 6 | 7 | src = fetchPypi { 8 | inherit pname version; 9 | sha256 = "a933e3bb13da54383f9e8f35dc4f9cb9eb9b3b78c6b36f311254d6d0d92c6c7c"; 10 | }; 11 | 12 | propagatedBuildInputs = [ idna ]; 13 | 14 | # Infinite recursion: tests require aiohttp, aiohttp requires idna-ssl 15 | doCheck = false; 16 | 17 | meta = with lib; { 18 | description = "Patch ssl.match_hostname for Unicode(idna) domains support"; 19 | homepage = "https://github.com/aio-libs/idna-ssl"; 20 | license = licenses.mit; 21 | maintainers = with maintainers; [ dotlambda ]; 22 | }; 23 | } 24 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/idna.nix: -------------------------------------------------------------------------------- 1 | { lib 2 | , buildPythonPackage 3 | , fetchPypi 4 | , pytestCheckHook 5 | }: 6 | 7 | buildPythonPackage rec { 8 | pname = "idna"; 9 | version = "2.10"; 10 | 11 | src = fetchPypi { 12 | inherit pname version; 13 | sha256 = "b307872f855b18632ce0c21c5e45be78c0ea7ae4c15c828c20788b26921eb3f6"; 14 | }; 15 | 16 | checkInputs = [ pytestCheckHook ]; 17 | 18 | meta = { 19 | homepage = "https://github.com/kjd/idna/"; 20 | description = "Internationalized Domain Names in Applications (IDNA)"; 21 | license = lib.licenses.bsd3; 22 | }; 23 | } 24 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/importlib-metadata.nix: -------------------------------------------------------------------------------- 1 | { lib 2 | , buildPythonPackage 3 | , fetchPypi 4 | , setuptools-scm 5 | , zipp 6 | , pathlib2 7 | , contextlib2 8 | , configparser 9 | , isPy3k 10 | }: 11 | 12 | buildPythonPackage rec { 13 | pname = "importlib-metadata"; 14 | version = "2.1.1"; 15 | 16 | src = fetchPypi { 17 | pname = "importlib_metadata"; 18 | inherit version; 19 | sha256 = "1pdmsmwagimn0lsl4x7sg3skcr2fvzqpv2pjd1rh7yrm5gzrxpmq"; 20 | }; 21 | 22 | nativeBuildInputs = [ setuptools-scm ]; 23 | 24 | propagatedBuildInputs = [ zipp ] 25 | ++ lib.optionals (!isPy3k) [ pathlib2 contextlib2 configparser ]; 26 | 27 | # Cyclic dependencies 28 | doCheck = false; 29 | 30 | pythonImportsCheck = [ "importlib_metadata" ]; 31 | 32 | meta = with lib; { 33 | description = "Read metadata from Python packages"; 34 | homepage = "https://importlib-metadata.readthedocs.io/"; 35 | license = licenses.asl20; 36 | }; 37 | } 38 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/ipaddress.nix: -------------------------------------------------------------------------------- 1 | { lib 2 | , buildPythonPackage 3 | , fetchPypi 4 | , pythonAtLeast 5 | , python 6 | }: 7 | 8 | if (pythonAtLeast "3.3") then null else buildPythonPackage rec { 9 | pname = "ipaddress"; 10 | version = "1.0.23"; 11 | 12 | src = fetchPypi { 13 | inherit pname version; 14 | sha256 = "b7f8e0369580bb4a24d5ba1d7cc29660a4a6987763faf1d8a8046830e020e7e2"; 15 | }; 16 | 17 | checkPhase = '' 18 | ${python.interpreter} test_ipaddress.py 19 | ''; 20 | 21 | meta = with lib; { 22 | description = "Port of the 3.3+ ipaddress module to 2.6, 2.7, and 3.2"; 23 | homepage = "https://github.com/phihag/ipaddress"; 24 | license = licenses.psfl; 25 | }; 26 | 27 | } 28 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/iso8601.nix: -------------------------------------------------------------------------------- 1 | { lib 2 | , buildPythonPackage 3 | , fetchPypi 4 | , pytestCheckHook 5 | }: 6 | 7 | buildPythonPackage rec { 8 | pname = "iso8601"; 9 | version = "0.1.14"; 10 | 11 | src = fetchPypi { 12 | inherit pname version; 13 | sha256 = "8aafd56fa0290496c5edbb13c311f78fa3a241f0853540da09d9363eae3ebd79"; 14 | }; 15 | 16 | checkInputs = [ 17 | pytestCheckHook 18 | ]; 19 | 20 | pytestFlagsArray = [ "iso8601" ]; 21 | 22 | pythonImportsCheck = [ "iso8601" ]; 23 | 24 | meta = with lib; { 25 | description = "Simple module to parse ISO 8601 dates"; 26 | homepage = "https://pyiso8601.readthedocs.io/"; 27 | license = with licenses; [ mit ]; 28 | maintainers = with maintainers; [ fab ]; 29 | }; 30 | } 31 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/itsdangerous.nix: -------------------------------------------------------------------------------- 1 | { lib 2 | , buildPythonPackage 3 | , fetchPypi 4 | }: 5 | 6 | buildPythonPackage rec { 7 | pname = "itsdangerous"; 8 | version = "1.1.0"; 9 | 10 | src = fetchPypi { 11 | inherit pname version; 12 | sha256 = "321b033d07f2a4136d3ec762eac9f16a10ccd60f53c0c91af90217ace7ba1f19"; 13 | }; 14 | 15 | meta = with lib; { 16 | description = "Helpers to pass trusted data to untrusted environments and back"; 17 | homepage = "https://pypi.python.org/pypi/itsdangerous/"; 18 | license = licenses.bsd0; 19 | }; 20 | 21 | } 22 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/linecache2.nix: -------------------------------------------------------------------------------- 1 | { lib 2 | , buildPythonPackage 3 | , fetchPypi 4 | , pbr 5 | }: 6 | 7 | buildPythonPackage rec { 8 | pname = "linecache2"; 9 | version = "1.0.0"; 10 | 11 | src = fetchPypi { 12 | inherit pname version; 13 | sha256 = "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"; 14 | }; 15 | 16 | buildInputs = [ pbr ]; 17 | # circular dependencies for tests 18 | doCheck = false; 19 | 20 | meta = with lib; { 21 | description = "A backport of linecache to older supported Pythons"; 22 | homepage = "https://github.com/testing-cabal/linecache2"; 23 | license = licenses.psfl; 24 | }; 25 | } 26 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/manifestparser.nix: -------------------------------------------------------------------------------- 1 | { lib 2 | , buildPythonPackage 3 | , fetchPypi 4 | , isPy3k 5 | }: 6 | 7 | buildPythonPackage rec { 8 | pname = "manifestparser"; 9 | version = "1.1"; 10 | 11 | disabled = isPy3k; 12 | 13 | src = fetchPypi { 14 | inherit pname version; 15 | sha256 = "06cnj682ynacwpi63k1427vbf7ydnwh3dchc4b11yw8ii25wbc5d"; 16 | }; 17 | 18 | propagatedBuildInputs = [ ]; 19 | 20 | meta = { 21 | description = "Mozilla test manifest handling"; 22 | homepage = "https://wiki.mozilla.org/Auto-tools/Projects/Mozbase"; 23 | license = lib.licenses.mpl20; 24 | maintainers = with lib.maintainers; [ raskin ]; 25 | }; 26 | } 27 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/marionette_driver.nix: -------------------------------------------------------------------------------- 1 | { lib 2 | , buildPythonPackage 3 | , fetchPypi 4 | , isPy3k 5 | , mozversion 6 | , mozrunner 7 | }: 8 | 9 | buildPythonPackage rec { 10 | pname = "marionette_driver"; 11 | version = "3.0.0"; 12 | disabled = isPy3k; 13 | 14 | src = fetchPypi { 15 | inherit pname version; 16 | sha256 = "99ca2513d4e2ca29a08e550346f23947a50627a2b02f6ad36a4550e779fa0ce8"; 17 | }; 18 | 19 | propagatedBuildInputs = [ mozversion mozrunner ]; 20 | 21 | meta = { 22 | description = "Mozilla Marionette driver"; 23 | homepage = "https://wiki.mozilla.org/Auto-tools/Projects/Marionette"; 24 | license = lib.licenses.mpl20; 25 | maintainers = with lib.maintainers; [ raskin ]; 26 | }; 27 | } 28 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/mccabe.nix: -------------------------------------------------------------------------------- 1 | { lib, buildPythonPackage, fetchPypi, pytest, pytest-runner }: 2 | 3 | buildPythonPackage rec { 4 | pname = "mccabe"; 5 | version = "0.6.1"; 6 | 7 | src = fetchPypi { 8 | inherit pname version; 9 | sha256 = "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"; 10 | }; 11 | 12 | buildInputs = [ pytest pytest-runner ]; 13 | 14 | meta = with lib; { 15 | description = "McCabe checker, plugin for flake8"; 16 | homepage = "https://github.com/flintwork/mccabe"; 17 | license = licenses.mit; 18 | maintainers = with maintainers; [ ]; 19 | }; 20 | } 21 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/mock.nix: -------------------------------------------------------------------------------- 1 | { lib 2 | , buildPythonPackage 3 | , fetchPypi 4 | , isPy27 5 | , funcsigs 6 | , six 7 | , pbr 8 | , python 9 | , pytest 10 | }: 11 | 12 | buildPythonPackage rec { 13 | pname = "mock"; 14 | version = "3.0.5"; 15 | 16 | src = fetchPypi { 17 | inherit pname version; 18 | sha256 = "83657d894c90d5681d62155c82bda9c1187827525880eda8ff5df4ec813437c3"; 19 | }; 20 | 21 | propagatedBuildInputs = [ six pbr ] ++ lib.optionals isPy27 [ funcsigs ]; 22 | 23 | # On PyPy for Python 2.7 in particular, Mock's tests have a known failure. 24 | # Mock upstream has a decoration to disable the failing test and make 25 | # everything pass, but it is not yet released. The commit: 26 | # https://github.com/testing-cabal/mock/commit/73bfd51b7185#diff-354f30a63fb0907d4ad57269548329e3L12 27 | #doCheck = !(python.isPyPy && python.isPy27); 28 | doCheck = false; # Infinite recursion pytest 29 | 30 | checkPhase = '' 31 | ${python.interpreter} -m unittest discover 32 | ''; 33 | 34 | checkInputs = [ 35 | pytest 36 | ]; 37 | 38 | meta = with lib; { 39 | description = "Mock objects for Python"; 40 | homepage = "http://python-mock.sourceforge.net/"; 41 | license = licenses.bsd2; 42 | }; 43 | 44 | } 45 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/more-itertools.nix: -------------------------------------------------------------------------------- 1 | { lib 2 | , buildPythonPackage 3 | , fetchPypi 4 | , nose 5 | , six 6 | , stdenv 7 | }: 8 | 9 | 10 | buildPythonPackage rec { 11 | pname = "more-itertools"; 12 | version = "5.0.0"; 13 | 14 | src = fetchPypi { 15 | inherit pname version; 16 | sha256 = "38a936c0a6d98a38bcc2d03fdaaedaba9f412879461dd2ceff8d37564d6522e4"; 17 | }; 18 | 19 | checkInputs = [ nose ]; 20 | propagatedBuildInputs = [ six ]; 21 | 22 | # iterable = range(10 ** 10) # Is efficiently reversible 23 | # OverflowError: Python int too large to convert to C long 24 | doCheck = !stdenv.hostPlatform.is32bit; 25 | 26 | meta = { 27 | homepage = "https://more-itertools.readthedocs.org"; 28 | description = "Expansion of the itertools module"; 29 | license = lib.licenses.mit; 30 | }; 31 | } 32 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/mozcrash.nix: -------------------------------------------------------------------------------- 1 | { lib 2 | , buildPythonPackage 3 | , fetchPypi 4 | , mozfile 5 | , mozlog 6 | }: 7 | 8 | buildPythonPackage rec { 9 | pname = "mozcrash"; 10 | version = "1.1.0"; 11 | 12 | src = fetchPypi { 13 | inherit pname version; 14 | sha256 = "8c2d2f32bd6e0ba3644f5d16e427444d8cb51ec1e9baa340a33e10687307f8c4"; 15 | }; 16 | 17 | propagatedBuildInputs = [ mozfile mozlog ]; 18 | 19 | meta = { 20 | description = "Minidump stack trace extractor"; 21 | homepage = "https://wiki.mozilla.org/Auto-tools/Projects/Mozbase"; 22 | license = lib.licenses.mpl20; 23 | maintainers = with lib.maintainers; [ raskin ]; 24 | }; 25 | } 26 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/mozdevice.nix: -------------------------------------------------------------------------------- 1 | { lib 2 | , buildPythonPackage 3 | , fetchPypi 4 | , mozlog 5 | , moznetwork 6 | , mozprocess 7 | }: 8 | 9 | buildPythonPackage rec { 10 | pname = "mozdevice"; 11 | version = "3.0.7"; 12 | format = "wheel"; 13 | 14 | src = fetchPypi { 15 | inherit pname version; 16 | sha256 = "1n7l3drdh3rm3320v98c9hhh37ljk9l861hyw18psca7jdd717n5"; 17 | format = "wheel"; 18 | }; 19 | 20 | propagatedBuildInputs = [ mozlog moznetwork mozprocess ]; 21 | 22 | meta = { 23 | description = "Mozilla-authored device management"; 24 | homepage = "https://wiki.mozilla.org/Auto-tools/Projects/Mozbase"; 25 | license = lib.licenses.mpl20; 26 | maintainers = with lib.maintainers; [ raskin ]; 27 | }; 28 | } 29 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/mozfile.nix: -------------------------------------------------------------------------------- 1 | { lib 2 | , buildPythonPackage 3 | , fetchPypi 4 | , six 5 | }: 6 | 7 | buildPythonPackage rec { 8 | pname = "mozfile"; 9 | version = "2.1.0"; 10 | 11 | src = fetchPypi { 12 | inherit pname version; 13 | sha256 = "e5dc835582ea150e35ecd57e9d86cb707d3aa3b2505679db7332326dd49fd6b8"; 14 | }; 15 | 16 | propagatedBuildInputs = [ six ]; 17 | 18 | # mozhttpd -> moznetwork -> mozinfo -> mozfile 19 | doCheck = false; 20 | 21 | meta = { 22 | description = "File utilities for Mozilla testing"; 23 | homepage = "https://wiki.mozilla.org/Auto-tools/Projects/Mozbase"; 24 | license = lib.licenses.mpl20; 25 | maintainers = with lib.maintainers; [ raskin ]; 26 | }; 27 | } 28 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/mozhttpd.nix: -------------------------------------------------------------------------------- 1 | { lib 2 | , buildPythonPackage 3 | , fetchPypi 4 | , moznetwork 5 | }: 6 | 7 | buildPythonPackage rec { 8 | pname = "mozhttpd"; 9 | version = "0.7.1"; 10 | 11 | src = fetchPypi { 12 | inherit pname version; 13 | sha256 = "3e2a9b4d6c007a1a9fb729d6e95b5404d138914727747e10155426492dced975"; 14 | }; 15 | 16 | propagatedBuildInputs = [ moznetwork ]; 17 | 18 | meta = { 19 | description = "Webserver for Mozilla testing"; 20 | homepage = "https://wiki.mozilla.org/Auto-tools/Projects/Mozbase"; 21 | license = lib.licenses.mpl20; 22 | maintainers = with lib.maintainers; [ raskin ]; 23 | }; 24 | } 25 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/mozinfo.nix: -------------------------------------------------------------------------------- 1 | { stdenv, lib 2 | , buildPythonPackage 3 | , fetchPypi 4 | , isPy3k 5 | , mozfile 6 | }: 7 | 8 | buildPythonPackage rec { 9 | pname = "mozinfo"; 10 | version = "1.1.0"; 11 | 12 | src = fetchPypi { 13 | inherit pname version; 14 | sha256 = "4525c26350fb85c26b38c5f853a19f47b17b49a74de363d285d54258972a4cbc"; 15 | }; 16 | 17 | disabled = isPy3k; 18 | 19 | propagatedBuildInputs = [ mozfile ]; 20 | 21 | meta = with lib; { 22 | description = "System information utilities for Mozilla testing"; 23 | homepage = "https://wiki.mozilla.org/Auto-tools/Projects/Mozbase"; 24 | license = licenses.mpl20; 25 | maintainers = with maintainers; [ raskin ]; 26 | }; 27 | } 28 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/mozlog.nix: -------------------------------------------------------------------------------- 1 | { lib 2 | , buildPythonPackage 3 | , fetchPypi 4 | , isPy3k 5 | , blessings 6 | , mozterm 7 | , six 8 | , mozfile 9 | }: 10 | 11 | buildPythonPackage rec { 12 | pname = "mozlog"; 13 | version = "5.0"; 14 | 15 | disabled = isPy3k; 16 | 17 | src = fetchPypi { 18 | inherit pname version; 19 | sha256 = "0h1hgs13c1w0wvz60400i37m00077li1ky28j7kgx4bl75pkd3sw"; 20 | }; 21 | 22 | propagatedBuildInputs = [ blessings mozterm six ]; 23 | 24 | checkInputs = [ mozfile ]; 25 | 26 | meta = { 27 | description = "Mozilla logging library"; 28 | homepage = "https://wiki.mozilla.org/Auto-tools/Projects/Mozbase"; 29 | license = lib.licenses.mpl20; 30 | maintainers = with lib.maintainers; [ raskin ]; 31 | }; 32 | } 33 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/moznetwork.nix: -------------------------------------------------------------------------------- 1 | { lib 2 | , buildPythonPackage 3 | , fetchPypi 4 | , mozlog 5 | , mozinfo 6 | }: 7 | 8 | buildPythonPackage rec { 9 | pname = "moznetwork"; 10 | version = "1.0.0"; 11 | 12 | src = fetchPypi { 13 | inherit pname version; 14 | sha256 = "0ws20l4ggb6mj7ycwrk5h7hj1jmj3mj0ca48k5jzsa4n042ahwrd"; 15 | }; 16 | 17 | propagatedBuildInputs = [ mozlog mozinfo ]; 18 | 19 | meta = { 20 | description = "Network utilities for Mozilla testing"; 21 | homepage = "https://wiki.mozilla.org/Auto-tools/Projects/Mozbase"; 22 | license = lib.licenses.mpl20; 23 | maintainers = with lib.maintainers; [ raskin ]; 24 | }; 25 | } 26 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/mozprocess.nix: -------------------------------------------------------------------------------- 1 | { lib 2 | , buildPythonPackage 3 | , fetchPypi 4 | , mozinfo 5 | }: 6 | 7 | buildPythonPackage rec { 8 | pname = "mozprocess"; 9 | version = "1.0.0"; 10 | 11 | src = fetchPypi { 12 | inherit pname version; 13 | sha256 = "a0fd8367e663d3cac74ee46bffa789667bc8d52f242d81a14522205fa6650cb2"; 14 | }; 15 | 16 | propagatedBuildInputs = [ mozinfo ]; 17 | 18 | meta = { 19 | description = "Mozilla-authored process handling"; 20 | homepage = "https://wiki.mozilla.org/Auto-tools/Projects/Mozbase"; 21 | license = lib.licenses.mpl20; 22 | maintainers = with lib.maintainers; [ raskin ]; 23 | }; 24 | } 25 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/mozprofile.nix: -------------------------------------------------------------------------------- 1 | { lib 2 | , buildPythonPackage 3 | , fetchPypi 4 | , mozlog 5 | , mozfile 6 | , mozhttpd 7 | , wptserve 8 | }: 9 | 10 | buildPythonPackage rec { 11 | pname = "mozprofile"; 12 | version = "2.4.0"; 13 | 14 | src = fetchPypi { 15 | inherit pname version; 16 | sha256 = "09l18x72vahq7il9nj6qj7la2d21vvbcn9szlm3vsvsbkz68w0yk"; 17 | }; 18 | 19 | propagatedBuildInputs = [ mozlog mozfile mozhttpd ]; 20 | 21 | checkInputs = [ wptserve ]; 22 | 23 | meta = { 24 | description = "Mozilla application profile handling library"; 25 | homepage = "https://wiki.mozilla.org/Auto-tools/Projects/Mozbase"; 26 | license = lib.licenses.mpl20; 27 | maintainers = with lib.maintainers; [ raskin ]; 28 | }; 29 | } 30 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/mozrunner.nix: -------------------------------------------------------------------------------- 1 | { lib 2 | , buildPythonPackage 3 | , fetchPypi 4 | , mozdevice 5 | , mozfile 6 | , mozinfo 7 | , mozlog 8 | , mozprocess 9 | , mozprofile 10 | , mozcrash 11 | }: 12 | 13 | buildPythonPackage rec { 14 | pname = "mozrunner"; 15 | version = "7.7.0"; 16 | 17 | src = fetchPypi { 18 | inherit pname version; 19 | sha256 = "04s6w0sp83bn3c6ym75rnlpmcy3yr7d35jxkxhgzmy75gbcps7bi"; 20 | }; 21 | 22 | propagatedBuildInputs = [ mozdevice mozfile mozinfo mozlog mozprocess 23 | mozprofile mozcrash ]; 24 | 25 | meta = { 26 | description = "Mozilla application start/stop helpers"; 27 | homepage = "https://wiki.mozilla.org/Auto-tools/Projects/Mozbase"; 28 | license = lib.licenses.mpl20; 29 | maintainers = with lib.maintainers; [ raskin ]; 30 | }; 31 | } 32 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/mozterm.nix: -------------------------------------------------------------------------------- 1 | { lib, buildPythonPackage, fetchPypi, isPy3k, six }: 2 | 3 | buildPythonPackage rec { 4 | pname = "mozterm"; 5 | version = "1.0.0"; 6 | 7 | # name 'unicode' is not defined 8 | disabled = isPy3k; 9 | 10 | propagatedBuildInputs = [six]; 11 | 12 | src = fetchPypi { 13 | inherit pname version; 14 | sha256 = "b1e91acec188de07c704dbb7b0100a7be5c1e06567b3beb67f6ea11d00a483a4"; 15 | }; 16 | 17 | meta = with lib; { 18 | description = "Terminal abstractions built around the blessings module"; 19 | license = licenses.mpl20; 20 | }; 21 | } 22 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/moztest.nix: -------------------------------------------------------------------------------- 1 | { lib 2 | , buildPythonPackage 3 | , fetchPypi 4 | , mozinfo 5 | }: 6 | 7 | buildPythonPackage rec { 8 | pname = "moztest"; 9 | version = "0.8"; 10 | 11 | src = fetchPypi { 12 | inherit pname version; 13 | sha256 = "1pg9pqq4xnn14k1jqbyqg81zag2v66y725537v6hixi41yiqkdas"; 14 | }; 15 | 16 | propagatedBuildInputs = [ mozinfo ]; 17 | 18 | meta = { 19 | description = "Mozilla test result storage and output"; 20 | homepage = "https://wiki.mozilla.org/Auto-tools/Projects/Mozbase"; 21 | license = lib.licenses.mpl20; 22 | maintainers = with lib.maintainers; [ raskin ]; 23 | }; 24 | } 25 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/mozversion.nix: -------------------------------------------------------------------------------- 1 | { lib 2 | , buildPythonPackage 3 | , fetchPypi 4 | , mozlog 5 | , mozdevice 6 | }: 7 | 8 | buildPythonPackage rec { 9 | pname = "mozversion"; 10 | version = "2.2.0"; 11 | 12 | src = fetchPypi { 13 | inherit pname version; 14 | sha256 = "0jczc1yr2yi3mf1qdgpvg9sidp5hf3jplzs4917j65ymvk2zw9na"; 15 | }; 16 | 17 | propagatedBuildInputs = [ mozlog mozdevice ]; 18 | 19 | meta = { 20 | description = "Application version information library"; 21 | homepage = "https://wiki.mozilla.org/Auto-tools/Projects/Mozbase"; 22 | license = lib.licenses.mpl20; 23 | maintainers = with lib.maintainers; [ raskin ]; 24 | }; 25 | } 26 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/multidict.nix: -------------------------------------------------------------------------------- 1 | { lib 2 | , fetchPypi 3 | , buildPythonPackage 4 | , pytestCheckHook 5 | , pythonOlder 6 | }: 7 | 8 | buildPythonPackage rec { 9 | pname = "multidict"; 10 | version = "5.2.0"; 11 | 12 | disabled = pythonOlder "3.6"; 13 | 14 | src = fetchPypi { 15 | inherit pname version; 16 | sha256 = "0dd1c93edb444b33ba2274b66f63def8a327d607c6c790772f448a53b6ea59ce"; 17 | }; 18 | 19 | postPatch = '' 20 | sed -i '/^addopts/d' setup.cfg 21 | ''; 22 | 23 | checkInputs = [ pytestCheckHook ]; 24 | 25 | pythonImportsCheck = [ "multidict" ]; 26 | 27 | meta = with lib; { 28 | description = "Multidict implementation"; 29 | homepage = "https://github.com/aio-libs/multidict/"; 30 | license = licenses.asl20; 31 | maintainers = with maintainers; [ dotlambda ]; 32 | }; 33 | } 34 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/mypy-extensions.nix: -------------------------------------------------------------------------------- 1 | { lib, fetchPypi, buildPythonPackage, typing, pythonOlder }: 2 | 3 | buildPythonPackage rec { 4 | pname = "mypy-extensions"; 5 | version = "0.4.3"; 6 | 7 | # Tests not included in pip package. 8 | doCheck = false; 9 | 10 | src = fetchPypi { 11 | inherit version; 12 | pname = "mypy_extensions"; 13 | sha256 = "2d82818f5bb3e369420cb3c4060a7970edba416647068eb4c5343488a6c604a8"; 14 | }; 15 | 16 | propagatedBuildInputs = lib.optional (pythonOlder "3.5") typing; 17 | 18 | meta = with lib; { 19 | description = "Experimental type system extensions for programs checked with the mypy typechecker"; 20 | homepage = "http://www.mypy-lang.org"; 21 | license = licenses.mit; 22 | maintainers = with maintainers; [ martingms lnl7 SuperSandro2000 ]; 23 | }; 24 | } 25 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/nose.nix: -------------------------------------------------------------------------------- 1 | { lib 2 | , buildPythonPackage 3 | , fetchPypi 4 | , python 5 | , coverage 6 | }: 7 | 8 | buildPythonPackage rec { 9 | version = "1.3.7"; 10 | pname = "nose"; 11 | 12 | src = fetchPypi { 13 | inherit pname version; 14 | sha256 = "f1bffef9cbc82628f6e7d7b40d7e255aefaa1adb6a1b1d26c69a8b79e6208a98"; 15 | }; 16 | 17 | propagatedBuildInputs = [ coverage ]; 18 | 19 | doCheck = false; # lot's of transient errors, too much hassle 20 | checkPhase = if python.is_py3k or false then '' 21 | ${python}/bin/${python.executable} setup.py build_tests 22 | '' else "" + '' 23 | rm functional_tests/test_multiprocessing/test_concurrent_shared.py* # see https://github.com/nose-devs/nose/commit/226bc671c73643887b36b8467b34ad485c2df062 24 | ${python}/bin/${python.executable} selftest.py 25 | ''; 26 | 27 | meta = with lib; { 28 | description = "A unittest-based testing framework for python that makes writing and running tests easier"; 29 | homepage = "http://readthedocs.org/docs/nose/"; 30 | license = licenses.lgpl3; 31 | }; 32 | 33 | } 34 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/packaging.nix: -------------------------------------------------------------------------------- 1 | { lib 2 | , buildPythonPackage 3 | , fetchPypi 4 | , pyparsing 5 | , six 6 | , pytestCheckHook 7 | , pretend 8 | }: 9 | 10 | # We keep 20.4 because it uses setuptools instead of flit-core 11 | # which requires Python 3 to build a universal wheel. 12 | 13 | buildPythonPackage rec { 14 | pname = "packaging"; 15 | version = "20.4"; 16 | format = "setuptools"; 17 | 18 | src = fetchPypi { 19 | inherit pname version; 20 | sha256 = "4357f74f47b9c12db93624a82154e9b120fa8293699949152b22065d556079f8"; 21 | }; 22 | 23 | propagatedBuildInputs = [ pyparsing six ]; 24 | 25 | checkInputs = [ 26 | pytestCheckHook 27 | pretend 28 | ]; 29 | 30 | # Prevent circular dependency 31 | doCheck = false; 32 | 33 | meta = with lib; { 34 | description = "Core utilities for Python packages"; 35 | homepage = "https://github.com/pypa/packaging"; 36 | license = [ licenses.bsd2 licenses.asl20 ]; 37 | maintainers = with maintainers; [ bennofs ]; 38 | }; 39 | } 40 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/parameterized.nix: -------------------------------------------------------------------------------- 1 | { lib 2 | , buildPythonPackage 3 | , fetchPypi 4 | , glibcLocales 5 | , isPy3k 6 | , mock 7 | , nose 8 | }: 9 | 10 | buildPythonPackage rec { 11 | pname = "parameterized"; 12 | version = "0.8.1"; 13 | disable = !isPy3k; 14 | 15 | src = fetchPypi { 16 | inherit pname version; 17 | sha256 = "sha256-Qbv/N9YYZDD3f5ANd35btqJJKKHEb7HeaS+LUriDO1w="; 18 | }; 19 | 20 | checkInputs = [ 21 | nose 22 | mock 23 | glibcLocales 24 | ]; 25 | 26 | checkPhase = '' 27 | runHook preCheck 28 | LC_ALL="en_US.UTF-8" nosetests -v 29 | runHook postCheck 30 | ''; 31 | 32 | pythonImportsCheck = [ "parameterized" ]; 33 | 34 | meta = with lib; { 35 | description = "Parameterized testing with any Python test framework"; 36 | homepage = "https://github.com/wolever/parameterized"; 37 | license = licenses.bsd2; 38 | maintainers = with maintainers; [ ]; 39 | }; 40 | } 41 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/pathlib2.nix: -------------------------------------------------------------------------------- 1 | { lib 2 | , buildPythonPackage 3 | , fetchPypi 4 | , six 5 | , pythonOlder 6 | , scandir ? null 7 | , glibcLocales 8 | , mock ? null 9 | }: 10 | 11 | buildPythonPackage rec { 12 | pname = "pathlib2"; 13 | version = "2.3.6"; 14 | 15 | src = fetchPypi { 16 | inherit pname version; 17 | sha256 = "7d8bcb5555003cdf4a8d2872c538faa3a0f5d20630cb360e518ca3b981795e5f"; 18 | }; 19 | 20 | propagatedBuildInputs = [ six ] ++ lib.optional (pythonOlder "3.5") scandir; 21 | checkInputs = [ glibcLocales ] ++ lib.optional (pythonOlder "3.3") mock; 22 | 23 | preCheck = '' 24 | export LC_ALL="en_US.UTF-8" 25 | ''; 26 | 27 | meta = { 28 | description = "This module offers classes representing filesystem paths with semantics appropriate for different operating systems."; 29 | homepage = "https://pypi.python.org/pypi/pathlib2/"; 30 | license = with lib.licenses; [ mit ]; 31 | }; 32 | } 33 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/pathspec.nix: -------------------------------------------------------------------------------- 1 | { lib 2 | , buildPythonPackage 3 | , fetchPypi 4 | }: 5 | 6 | buildPythonPackage rec { 7 | pname = "pathspec"; 8 | version = "0.9.0"; 9 | 10 | src = fetchPypi { 11 | inherit pname version; 12 | sha256 = "e564499435a2673d586f6b2130bb5b95f04a3ba06f81b8f895b651a3c76aabb1"; 13 | }; 14 | 15 | meta = { 16 | description = "Utility library for gitignore-style pattern matching of file paths"; 17 | homepage = "https://github.com/cpburnz/python-path-specification"; 18 | license = lib.licenses.mpl20; 19 | maintainers = with lib.maintainers; [ copumpkin ]; 20 | }; 21 | } 22 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/pathtools.nix: -------------------------------------------------------------------------------- 1 | { lib 2 | , buildPythonPackage 3 | , fetchPypi 4 | }: 5 | 6 | buildPythonPackage rec { 7 | pname = "pathtools"; 8 | version = "0.1.2"; 9 | 10 | src = fetchPypi { 11 | inherit pname version; 12 | sha256 = "1h7iam33vwxk8bvslfj4qlsdprdnwf8bvzhqh3jq5frr391cadbw"; 13 | }; 14 | 15 | meta = with lib; { 16 | description = "Pattern matching and various utilities for file systems paths"; 17 | homepage = "https://github.com/gorakhargosh/pathtools"; 18 | license = licenses.mit; 19 | maintainers = with maintainers; [ goibhniu ]; 20 | }; 21 | 22 | } 23 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/pbr.nix: -------------------------------------------------------------------------------- 1 | { lib 2 | , buildPythonPackage 3 | , fetchPypi 4 | , setuptools 5 | , callPackage 6 | }: 7 | 8 | buildPythonPackage rec { 9 | pname = "pbr"; 10 | version = "5.8.0"; 11 | 12 | src = fetchPypi { 13 | inherit pname version; 14 | sha256 = "672d8ebee84921862110f23fcec2acea191ef58543d34dfe9ef3d9f13c31cddf"; 15 | }; 16 | 17 | propagatedBuildInputs = [ setuptools ]; 18 | 19 | # check in passthru.tests.pytest to escape infinite recursion with fixtures 20 | doCheck = false; 21 | 22 | passthru.tests = { 23 | tests = callPackage ./tests.nix { }; 24 | }; 25 | 26 | pythonImportsCheck = [ "pbr" ]; 27 | 28 | meta = with lib; { 29 | description = "Python Build Reasonableness"; 30 | homepage = "https://github.com/openstack/pbr"; 31 | license = licenses.asl20; 32 | maintainers = teams.openstack.members; 33 | }; 34 | } 35 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/platformdirs.nix: -------------------------------------------------------------------------------- 1 | { lib 2 | , appdirs 3 | , buildPythonPackage 4 | , fetchFromGitHub 5 | , platformdirs 6 | , pytest-mock 7 | , pytestCheckHook 8 | , pythonOlder 9 | , setuptools-scm 10 | }: 11 | 12 | buildPythonPackage rec { 13 | pname = "platformdirs"; 14 | version = "2.4.0"; 15 | disabled = pythonOlder "3.6"; 16 | 17 | src = fetchFromGitHub { 18 | owner = pname; 19 | repo = pname; 20 | rev = version; 21 | sha256 = "sha256-Ox1CVq2M2eddZtpuZx0IfvuOm6RPsAs27WkMdZSeh0E="; 22 | }; 23 | 24 | SETUPTOOLS_SCM_PRETEND_VERSION = version; 25 | 26 | nativeBuildInputs = [ 27 | setuptools-scm 28 | ]; 29 | 30 | checkInputs = [ 31 | appdirs 32 | pytest-mock 33 | pytestCheckHook 34 | ]; 35 | 36 | pythonImportsCheck = [ "platformdirs" ]; 37 | 38 | meta = with lib; { 39 | description = "Python module for determining appropriate platform-specific directories"; 40 | homepage = "https://platformdirs.readthedocs.io/"; 41 | license = licenses.mit; 42 | maintainers = with maintainers; [ fab ]; 43 | }; 44 | } 45 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/pluggy.nix: -------------------------------------------------------------------------------- 1 | { buildPythonPackage 2 | , lib 3 | , fetchPypi 4 | , setuptools-scm 5 | , importlib-metadata 6 | }: 7 | 8 | buildPythonPackage rec { 9 | pname = "pluggy"; 10 | version = "0.13.1"; 11 | 12 | src = fetchPypi { 13 | inherit pname version; 14 | sha256 = "15b2acde666561e1298d71b523007ed7364de07029219b604cf808bfa1c765b0"; 15 | }; 16 | 17 | checkPhase = '' 18 | py.test 19 | ''; 20 | 21 | # To prevent infinite recursion with pytest 22 | doCheck = false; 23 | 24 | nativeBuildInputs = [ setuptools-scm ]; 25 | 26 | propagatedBuildInputs = [ importlib-metadata ]; 27 | 28 | meta = { 29 | description = "Plugin and hook calling mechanisms for Python"; 30 | homepage = "https://github.com/pytest-dev/pluggy"; 31 | license = lib.licenses.mit; 32 | maintainers = with lib.maintainers; [ ]; 33 | }; 34 | } 35 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/pretend.nix: -------------------------------------------------------------------------------- 1 | { lib, buildPythonPackage, fetchPypi }: 2 | 3 | buildPythonPackage rec { 4 | pname = "pretend"; 5 | version = "1.0.9"; 6 | 7 | src = fetchPypi { 8 | inherit pname version; 9 | sha256 = "c90eb810cde8ebb06dafcb8796f9a95228ce796531bc806e794c2f4649aa1b10"; 10 | }; 11 | 12 | # No tests in archive 13 | doCheck = false; 14 | 15 | meta = with lib; { 16 | homepage = "https://github.com/alex/pretend"; 17 | license = licenses.bsd3; 18 | }; 19 | } 20 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/ptyprocess.nix: -------------------------------------------------------------------------------- 1 | { lib 2 | , buildPythonPackage 3 | , fetchPypi 4 | , fetchpatch 5 | }: 6 | 7 | buildPythonPackage rec { 8 | pname = "ptyprocess"; 9 | version = "0.7.0"; 10 | 11 | src = fetchPypi { 12 | inherit pname version; 13 | sha256 = "5c5d0a3b48ceee0b48485e0c26037c0acd7d29765ca3fbb5cb3831d347423220"; 14 | }; 15 | 16 | patches = [ 17 | # Remove after https://github.com/pexpect/ptyprocess/pull/64 is merged. 18 | (fetchpatch { 19 | url = "https://github.com/pexpect/ptyprocess/commit/40c1ccf3432a6787be1801ced721540e34c6cd87.patch"; 20 | sha256 = "sha256-IemngBqBq3QRCmVscWtsuXHiFgvTOJIIB9SyAvsqHd0="; 21 | }) 22 | ]; 23 | 24 | meta = { 25 | description = "Run a subprocess in a pseudo terminal"; 26 | homepage = "https://github.com/pexpect/ptyprocess"; 27 | license = lib.licenses.isc; 28 | }; 29 | } 30 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/py.nix: -------------------------------------------------------------------------------- 1 | { lib, buildPythonPackage, fetchPypi, setuptools-scm }: 2 | 3 | buildPythonPackage rec { 4 | pname = "py"; 5 | version = "1.11.0"; 6 | 7 | src = fetchPypi { 8 | inherit pname version; 9 | sha256 = "51c75c4126074b472f746a24399ad32f6053d1b34b68d2fa41e558e6f4a98719"; 10 | }; 11 | 12 | # Circular dependency on pytest 13 | doCheck = false; 14 | 15 | nativeBuildInputs = [ setuptools-scm ]; 16 | 17 | pythonImportsCheck = [ 18 | "py" 19 | ]; 20 | 21 | meta = with lib; { 22 | description = "Library with cross-python path, ini-parsing, io, code, log facilities"; 23 | homepage = "https://py.readthedocs.io/"; 24 | license = licenses.mit; 25 | }; 26 | } 27 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/pyasn1-modules.nix: -------------------------------------------------------------------------------- 1 | { lib 2 | , buildPythonPackage 3 | , fetchPypi 4 | , pyasn1 5 | , pytest 6 | }: 7 | 8 | buildPythonPackage rec { 9 | pname = "pyasn1-modules"; 10 | version = "0.2.8"; 11 | 12 | src = fetchPypi { 13 | inherit pname version; 14 | sha256 = "905f84c712230b2c592c19470d3ca8d552de726050d1d1716282a1f6146be65e"; 15 | }; 16 | 17 | propagatedBuildInputs = [ pyasn1 ]; 18 | 19 | checkInputs = [ 20 | pytest 21 | ]; 22 | 23 | # running tests through setup.py fails only for python2 for some reason: 24 | # AttributeError: 'module' object has no attribute 'suitetests' 25 | checkPhase = '' 26 | py.test 27 | ''; 28 | 29 | meta = with lib; { 30 | description = "A collection of ASN.1-based protocols modules"; 31 | homepage = "https://pypi.python.org/pypi/pyasn1-modules"; 32 | license = licenses.bsd3; 33 | platforms = platforms.unix; # same as pyasn1 34 | }; 35 | } 36 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/pyasn1.nix: -------------------------------------------------------------------------------- 1 | { lib, buildPythonPackage, fetchPypi, }: 2 | 3 | buildPythonPackage rec { 4 | pname = "pyasn1"; 5 | version = "0.4.8"; 6 | 7 | src = fetchPypi { 8 | inherit pname version; 9 | sha256 = "aef77c9fb94a3ac588e87841208bdec464471d9871bd5050a287cc9a475cd0ba"; 10 | }; 11 | 12 | meta = with lib; { 13 | description = "ASN.1 tools for Python"; 14 | homepage = "http://pyasn1.sourceforge.net/"; 15 | license = "mBSD"; 16 | platforms = platforms.unix; # arbitrary choice 17 | }; 18 | } 19 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/pycares.nix: -------------------------------------------------------------------------------- 1 | { lib 2 | , buildPythonPackage 3 | , c-ares 4 | , cffi 5 | , fetchPypi 6 | , idna 7 | }: 8 | 9 | buildPythonPackage rec { 10 | pname = "pycares"; 11 | version = "4.1.2"; 12 | 13 | src = fetchPypi { 14 | inherit pname version; 15 | sha256 = "sha256-A0kL4Oe1GgyAc/h3vsNH7/MQA/ZPV9lRjUGdk2lFKDc="; 16 | }; 17 | 18 | buildInputs = [ 19 | c-ares 20 | ]; 21 | 22 | propagatedBuildInputs = [ 23 | cffi 24 | idna 25 | ]; 26 | 27 | propagatedNativeBuildInputs = [ 28 | cffi 29 | ]; 30 | 31 | # Requires network access 32 | doCheck = false; 33 | 34 | pythonImportsCheck = [ "pycares" ]; 35 | 36 | meta = with lib; { 37 | description = "Python interface for c-ares"; 38 | homepage = "https://github.com/saghul/pycares"; 39 | license = licenses.mit; 40 | maintainers = with maintainers; [ fab ]; 41 | }; 42 | } 43 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/pycodestyle.nix: -------------------------------------------------------------------------------- 1 | { buildPythonPackage 2 | , fetchPypi 3 | , lib 4 | , python 5 | }: 6 | 7 | buildPythonPackage rec { 8 | pname = "pycodestyle"; 9 | version = "2.8.0"; 10 | 11 | src = fetchPypi { 12 | inherit pname version; 13 | sha256 = "0zxyrg8029lzjhima6l5nk6y0z6lm5wfp9qchz3s33j3xx3mipgd"; 14 | }; 15 | 16 | dontUseSetuptoolsCheck = true; 17 | 18 | # https://github.com/PyCQA/pycodestyle/blob/2.5.0/tox.ini#L14 19 | checkPhase = '' 20 | ${python.interpreter} pycodestyle.py --max-doc-length=72 --testsuite testsuite 21 | ${python.interpreter} pycodestyle.py --statistics pycodestyle.py 22 | ${python.interpreter} pycodestyle.py --max-doc-length=72 --doctest 23 | ${python.interpreter} -m unittest discover testsuite -vv 24 | ''; 25 | 26 | meta = with lib; { 27 | description = "Python style guide checker (formerly called pep8)"; 28 | homepage = "https://pycodestyle.readthedocs.io"; 29 | license = licenses.mit; 30 | maintainers = with maintainers; [ 31 | kamadorueda 32 | ]; 33 | }; 34 | } 35 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/pycparser.nix: -------------------------------------------------------------------------------- 1 | { lib, buildPythonPackage, fetchPypi, python }: 2 | 3 | buildPythonPackage rec { 4 | pname = "pycparser"; 5 | version = "2.21"; 6 | 7 | src = fetchPypi { 8 | inherit pname version; 9 | sha256 = "e644fdec12f7872f86c58ff790da456218b10f863970249516d60a5eaca77206"; 10 | }; 11 | 12 | checkPhase = '' 13 | ${python.interpreter} -m unittest discover -s tests 14 | ''; 15 | 16 | meta = with lib; { 17 | description = "C parser in Python"; 18 | homepage = "https://github.com/eliben/pycparser"; 19 | license = licenses.bsd3; 20 | maintainers = with maintainers; [ domenkozar ]; 21 | }; 22 | } 23 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/pyflakes.nix: -------------------------------------------------------------------------------- 1 | { lib, buildPythonPackage, fetchPypi, pythonOlder, unittest2 }: 2 | 3 | buildPythonPackage rec { 4 | pname = "pyflakes"; 5 | version = "2.4.0"; 6 | 7 | src = fetchPypi { 8 | inherit pname version; 9 | sha256 = "05a85c2872edf37a4ed30b0cce2f6093e1d0581f8c19d7393122da7e25b2b24c"; 10 | }; 11 | 12 | checkInputs = [ unittest2 ]; 13 | 14 | # some tests are output dependent, which have changed slightly 15 | doCheck = pythonOlder "3.9"; 16 | 17 | meta = with lib; { 18 | homepage = "https://launchpad.net/pyflakes"; 19 | description = "A simple program which checks Python source files for errors"; 20 | license = licenses.mit; 21 | maintainers = with maintainers; [ ]; 22 | }; 23 | } 24 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/pyparsing.nix: -------------------------------------------------------------------------------- 1 | { buildPythonPackage 2 | , fetchFromGitHub 3 | , lib 4 | 5 | # pythonPackages 6 | , coverage 7 | }: 8 | 9 | buildPythonPackage rec { 10 | pname = "pyparsing"; 11 | version = "2.4.7"; 12 | 13 | src = fetchFromGitHub { 14 | owner = "pyparsing"; 15 | repo = pname; 16 | rev = "pyparsing_${version}"; 17 | sha256 = "14pfy80q2flgzjcx8jkracvnxxnr59kjzp3kdm5nh232gk1v6g6h"; 18 | }; 19 | 20 | # https://github.com/pyparsing/pyparsing/blob/847af590154743bae61a32c3dc1a6c2a19009f42/tox.ini#L6 21 | checkInputs = [ coverage ]; 22 | checkPhase = '' 23 | coverage run --branch simple_unit_tests.py 24 | coverage run --branch unitTests.py 25 | ''; 26 | 27 | nativeCheckInputs = [ coverage ]; 28 | 29 | meta = with lib; { 30 | homepage = "https://github.com/pyparsing/pyparsing"; 31 | description = "An alternative approach to creating and executing simple grammars, vs. the traditional lex/yacc approach, or the use of regular expressions"; 32 | license = licenses.mit; 33 | maintainers = with maintainers; [ 34 | kamadorueda 35 | ]; 36 | }; 37 | } 38 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/pysocks.nix: -------------------------------------------------------------------------------- 1 | { lib 2 | , buildPythonPackage 3 | , fetchPypi 4 | }: 5 | 6 | buildPythonPackage rec { 7 | pname = "pysocks"; 8 | version = "1.7.1"; 9 | 10 | src = fetchPypi { 11 | pname = "PySocks"; 12 | inherit version; 13 | sha256 = "184sg65mbmih6ljblfsxcmq5js5l7dj3gpn618w9q5dy3rbh921z"; 14 | }; 15 | 16 | doCheck = false; 17 | 18 | meta = with lib; { 19 | description = "SOCKS module for Python"; 20 | license = licenses.bsd3; 21 | maintainers = with maintainers; [ thoughtpolice ]; 22 | }; 23 | 24 | } 25 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/pytest-asyncio.nix: -------------------------------------------------------------------------------- 1 | { lib, buildPythonPackage, fetchPypi, pytest, isPy3k, isPy35, async_generator }: 2 | buildPythonPackage rec { 3 | pname = "pytest-asyncio"; 4 | version = "0.16.0"; 5 | 6 | disabled = !isPy3k; 7 | 8 | src = fetchPypi { 9 | inherit pname version; 10 | sha256 = "7496c5977ce88c34379df64a66459fe395cd05543f0a2f837016e7144391fcfb"; 11 | }; 12 | 13 | buildInputs = [ pytest ] 14 | ++ lib.optionals isPy35 [ async_generator ]; 15 | 16 | # No tests in archive 17 | doCheck = false; 18 | 19 | # LICENSE file is not distributed. https://github.com/pytest-dev/pytest-asyncio/issues/92 20 | postPatch = '' 21 | substituteInPlace setup.cfg --replace "license_file = LICENSE" "" 22 | ''; 23 | 24 | meta = with lib; { 25 | description = "library for testing asyncio code with pytest"; 26 | license = licenses.asl20; 27 | homepage = "https://github.com/pytest-dev/pytest-asyncio"; 28 | }; 29 | } 30 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/pytest-black.nix: -------------------------------------------------------------------------------- 1 | { lib, buildPythonPackage, fetchPypi 2 | , black 3 | , pytest 4 | , setuptools-scm 5 | , toml 6 | }: 7 | 8 | buildPythonPackage rec { 9 | pname = "pytest-black"; 10 | version = "0.3.12"; 11 | 12 | src = fetchPypi { 13 | inherit pname version; 14 | sha256 = "1d339b004f764d6cd0f06e690f6dd748df3d62e6fe1a692d6a5500ac2c5b75a5"; 15 | }; 16 | 17 | nativeBuildInputs = [ setuptools-scm ]; 18 | 19 | buildInputs = [ pytest ]; 20 | 21 | propagatedBuildInputs = [ black toml ]; 22 | 23 | # does not contain tests 24 | doCheck = false; 25 | pythonImportsCheck = [ "pytest_black" ]; 26 | 27 | meta = with lib; { 28 | description = "A pytest plugin to enable format checking with black"; 29 | homepage = "https://github.com/shopkeep/pytest-black"; 30 | license = licenses.mit; 31 | maintainers = with maintainers; [ jonringer ]; 32 | }; 33 | } 34 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/pytest-check-hook.nix: -------------------------------------------------------------------------------- 1 | { makePythonHook, pythonCheckInterpreter, pytest }: 2 | makePythonHook { 3 | name = "pytest-check-hook"; 4 | propagatedBuildInputs = [ pytest ]; 5 | substitutions = { 6 | inherit pythonCheckInterpreter; 7 | }; 8 | } ./pytest-check-hook.sh 9 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/pytest-cov.nix: -------------------------------------------------------------------------------- 1 | { lib 2 | , buildPythonPackage 3 | , fetchPypi 4 | , pytest 5 | , coverage 6 | , toml 7 | }: 8 | 9 | buildPythonPackage rec { 10 | pname = "pytest-cov"; 11 | version = "2.12.1"; 12 | 13 | src = fetchPypi { 14 | inherit pname version; 15 | sha256 = "1mzl06m8qcgsac1r2krixrkqdwq0nqk8asrpkcj2ddr7qawfw716"; 16 | }; 17 | 18 | buildInputs = [ pytest ]; 19 | 20 | propagatedBuildInputs = [ coverage toml ]; 21 | 22 | # xdist related tests fail with the following error 23 | # OSError: [Errno 13] Permission denied: 'py/_code' 24 | doCheck = false; 25 | checkPhase = '' 26 | # allow to find the module helper during the test run 27 | export PYTHONPATH=$PYTHONPATH:$PWD/tests 28 | py.test tests 29 | ''; 30 | 31 | pythonImportsCheck = [ "pytest_cov" ]; 32 | 33 | meta = with lib; { 34 | description = "Plugin for coverage reporting with support for both centralised and distributed testing, including subprocesses and multiprocessing"; 35 | homepage = "https://github.com/pytest-dev/pytest-cov"; 36 | license = licenses.mit; 37 | }; 38 | } 39 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/pytest-forked.nix: -------------------------------------------------------------------------------- 1 | { lib 2 | , buildPythonPackage 3 | , fetchPypi 4 | , setuptools-scm 5 | , pytest 6 | }: 7 | 8 | buildPythonPackage rec { 9 | pname = "pytest-forked"; 10 | version = "1.3.0"; 11 | 12 | src = fetchPypi { 13 | inherit pname version; 14 | sha256 = "6aa9ac7e00ad1a539c41bec6d21011332de671e938c7637378ec9710204e37ca"; 15 | }; 16 | 17 | buildInputs = [ pytest setuptools-scm ]; 18 | 19 | # Do not function 20 | doCheck = false; 21 | 22 | checkPhase = '' 23 | py.test testing 24 | ''; 25 | 26 | meta = { 27 | description = "Run tests in isolated forked subprocesses"; 28 | homepage = "https://github.com/pytest-dev/pytest-forked"; 29 | license = lib.licenses.mit; 30 | }; 31 | 32 | } 33 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/pytest-freezegun.nix: -------------------------------------------------------------------------------- 1 | { lib 2 | , buildPythonPackage 3 | , fetchFromGitHub 4 | , freezegun 5 | , pytest 6 | , pytestCheckHook 7 | }: 8 | 9 | buildPythonPackage rec { 10 | pname = "pytest-freezegun"; 11 | version = "0.4.2"; 12 | 13 | src = fetchFromGitHub { 14 | owner = "ktosiek"; 15 | repo = "pytest-freezegun"; 16 | rev = version; 17 | sha256 = "10c4pbh03b4s1q8cjd75lr0fvyf9id0zmdk29566qqsmaz28npas"; 18 | }; 19 | 20 | buildInputs = [ pytest ]; 21 | 22 | propagatedBuildInputs = [ 23 | freezegun 24 | ]; 25 | 26 | checkInputs = [ 27 | pytestCheckHook 28 | ]; 29 | 30 | meta = with lib; { 31 | description = "Wrap tests with fixtures in freeze_time"; 32 | homepage = "https://github.com/ktosiek/pytest-freezegun"; 33 | license = licenses.mit; 34 | maintainers = [ maintainers.mic92 ]; 35 | }; 36 | } 37 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/pytest-localserver.nix: -------------------------------------------------------------------------------- 1 | { buildPythonPackage 2 | , lib 3 | , fetchPypi 4 | , werkzeug 5 | }: 6 | 7 | buildPythonPackage rec { 8 | pname = "pytest-localserver"; 9 | version = "0.5.1"; 10 | 11 | src = fetchPypi { 12 | inherit pname version; 13 | sha256 = "ef6f04193dc0f7e8df5b27b3a8834318fa12eaf025436d2a99afff1b73cde761"; 14 | }; 15 | 16 | propagatedBuildInputs = [ werkzeug ]; 17 | 18 | # all tests access network: does not work in sandbox 19 | doCheck = false; 20 | pythonImportsCheck = [ "pytest_localserver" ]; 21 | 22 | meta = with lib; { 23 | description = "Plugin for the pytest testing framework to test server connections locally"; 24 | homepage = "https://pypi.python.org/pypi/pytest-localserver"; 25 | license = licenses.mit; 26 | maintainers = with maintainers; [ siriobalmelli ]; 27 | }; 28 | } 29 | 30 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/pytest-mock.nix: -------------------------------------------------------------------------------- 1 | { lib 2 | , buildPythonPackage 3 | , fetchPypi 4 | , pytest-asyncio 5 | , pytestCheckHook 6 | , setuptools-scm 7 | }: 8 | 9 | buildPythonPackage rec { 10 | pname = "pytest-mock"; 11 | version = "3.6.1"; 12 | 13 | src = fetchPypi { 14 | inherit pname version; 15 | sha256 = "40217a058c52a63f1042f0784f62009e976ba824c418cced42e88d5f40ab0e62"; 16 | }; 17 | 18 | nativeBuildInputs = [ setuptools-scm ]; 19 | 20 | checkInputs = [ 21 | pytest-asyncio 22 | pytestCheckHook 23 | ]; 24 | 25 | pythonImportsCheck = [ "pytest_mock" ]; 26 | 27 | meta = with lib; { 28 | description = "Thin-wrapper around the mock package for easier use with pytest"; 29 | homepage = "https://github.com/pytest-dev/pytest-mock"; 30 | license = with licenses; [ mit ]; 31 | maintainers = with maintainers; [ ]; 32 | }; 33 | } 34 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/pytest-runner.nix: -------------------------------------------------------------------------------- 1 | { lib, buildPythonPackage, fetchPypi, setuptools-scm, pytest }: 2 | 3 | buildPythonPackage rec { 4 | pname = "pytest-runner"; 5 | version = "5.2"; 6 | 7 | src = fetchPypi { 8 | inherit pname version; 9 | sha256 = "96c7e73ead7b93e388c5d614770d2bae6526efd997757d3543fe17b557a0942b"; 10 | }; 11 | 12 | nativeBuildInputs = [ setuptools-scm pytest ]; 13 | 14 | postPatch = '' 15 | rm pytest.ini 16 | ''; 17 | 18 | checkPhase = '' 19 | py.test tests 20 | ''; 21 | 22 | # Fixture not found 23 | doCheck = false; 24 | 25 | meta = with lib; { 26 | description = "Invoke py.test as distutils command with dependency resolution"; 27 | homepage = "https://github.com/pytest-dev/pytest-runner"; 28 | license = licenses.mit; 29 | }; 30 | } 31 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/pytest-timeout.nix: -------------------------------------------------------------------------------- 1 | { lib 2 | , buildPythonPackage 3 | , fetchPypi 4 | , pytest 5 | , pytestCheckHook 6 | , pexpect 7 | , pytest-cov 8 | }: 9 | 10 | buildPythonPackage rec { 11 | pname = "pytest-timeout"; 12 | version = "1.4.2"; 13 | 14 | src = fetchPypi { 15 | inherit pname version; 16 | sha256 = "0xnsigs0kmpq1za0d4i522sp3f71x5bgpdh3ski0rs74yqy13cr0"; 17 | }; 18 | 19 | buildInputs = [ pytest ]; 20 | 21 | checkInputs = [ pytestCheckHook pexpect pytest-cov ]; 22 | 23 | disabledTests = [ 24 | "test_suppresses_timeout_when_pdb_is_entered" 25 | # Remove until https://github.com/pytest-dev/pytest/pull/7207 or similar 26 | "test_suppresses_timeout_when_debugger_is_entered" 27 | ]; 28 | pytestFlagsArray = [ 29 | "-ra" 30 | ]; 31 | 32 | meta = with lib; { 33 | description = "py.test plugin to abort hanging tests"; 34 | homepage = "https://github.com/pytest-dev/pytest-timeout/"; 35 | changelog = "https://github.com/pytest-dev/pytest-timeout/#changelog"; 36 | license = licenses.mit; 37 | maintainers = with maintainers; [ makefu costrouc ]; 38 | }; 39 | } 40 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/pytest-xprocess.nix: -------------------------------------------------------------------------------- 1 | { lib, buildPythonPackage, fetchPypi 2 | , psutil 3 | , pytest 4 | , setuptools-scm 5 | }: 6 | 7 | buildPythonPackage rec { 8 | pname = "pytest-xprocess"; 9 | version = "0.18.1"; 10 | 11 | src = fetchPypi { 12 | inherit pname version; 13 | sha256 = "fd9f30ed1584b5833bc34494748adf0fb9de3ca7bacc4e88ad71989c21cba266"; 14 | }; 15 | 16 | nativeBuildInputs = [ setuptools-scm ]; 17 | 18 | buildInputs = [ pytest ]; 19 | 20 | propagatedBuildInputs = [ psutil ]; 21 | 22 | # Remove test QoL package from install_requires 23 | postPatch = '' 24 | substituteInPlace setup.py \ 25 | --replace "'pytest-cache', " "" 26 | ''; 27 | 28 | # There's no tests in repo 29 | doCheck = false; 30 | 31 | meta = with lib; { 32 | description = "Pytest external process plugin"; 33 | homepage = "https://github.com/pytest-dev"; 34 | license = licenses.mit; 35 | maintainers = with maintainers; [ jonringer ]; 36 | }; 37 | } 38 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/pytz.nix: -------------------------------------------------------------------------------- 1 | { lib, buildPythonPackage, fetchPypi, python }: 2 | 3 | buildPythonPackage rec { 4 | pname = "pytz"; 5 | version = "2021.3"; 6 | 7 | src = fetchPypi { 8 | inherit pname version; 9 | sha256 = "acad2d8b20a1af07d4e4c9d2e9285c5ed9104354062f275f3fcd88dcef4f1326"; 10 | }; 11 | 12 | checkPhase = '' 13 | ${python.interpreter} -m unittest discover -s pytz/tests 14 | ''; 15 | 16 | pythonImportsCheck = [ "pytz" ]; 17 | 18 | meta = with lib; { 19 | description = "World timezone definitions, modern and historical"; 20 | homepage = "https://pythonhosted.org/pytz"; 21 | license = licenses.mit; 22 | maintainers = with maintainers; [ dotlambda ]; 23 | }; 24 | } 25 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/pyyaml.nix: -------------------------------------------------------------------------------- 1 | { lib 2 | , buildPythonPackage 3 | , fetchFromGitHub 4 | , cython 5 | , libyaml 6 | , isPy27 7 | , python 8 | }: 9 | 10 | buildPythonPackage rec { 11 | pname = "PyYAML"; 12 | version = "5.4.1.1"; 13 | 14 | src = fetchFromGitHub { 15 | owner = "yaml"; 16 | repo = "pyyaml"; 17 | rev = version; 18 | sha256 = "1v386gzdvsjg0mgix6v03rd0cgs9dl81qvn3m547849jm8r41dx8"; 19 | }; 20 | 21 | nativeBuildInputs = [ cython ]; 22 | 23 | buildInputs = [ libyaml ]; 24 | 25 | checkPhase = let 26 | testdir = if isPy27 then "tests/lib" else "tests/lib3"; 27 | in '' 28 | runHook preCheck 29 | PYTHONPATH="${testdir}:$PYTHONPATH" ${python.interpreter} -m test_all 30 | runHook postCheck 31 | ''; 32 | 33 | pythonImportsCheck = [ "yaml" ]; 34 | 35 | meta = with lib; { 36 | description = "The next generation YAML parser and emitter for Python"; 37 | homepage = "https://github.com/yaml/pyyaml"; 38 | license = licenses.mit; 39 | maintainers = with maintainers; [ dotlambda ]; 40 | }; 41 | } 42 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/re-assert.nix: -------------------------------------------------------------------------------- 1 | { lib 2 | , buildPythonPackage 3 | , fetchPypi 4 | , regex 5 | }: 6 | 7 | buildPythonPackage rec { 8 | pname = "re_assert"; 9 | version = "1.1.0"; 10 | 11 | src = fetchPypi { 12 | inherit pname version; 13 | sha256 = "5172dfbd2047a15dff2347735dea7e495479cc7e58841199a4a4973256b20464"; 14 | }; 15 | 16 | # No tests in archive 17 | doCheck = false; 18 | 19 | propagatedBuildInputs = [ 20 | regex 21 | ]; 22 | 23 | meta = { 24 | description = "Show where your regex match assertion failed"; 25 | license = lib.licenses.mit; 26 | homepage = "https://github.com/asottile/re-assert"; 27 | }; 28 | } 29 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/regex.nix: -------------------------------------------------------------------------------- 1 | { lib 2 | , buildPythonPackage 3 | , fetchPypi 4 | , python 5 | , isPy27 6 | }: 7 | 8 | buildPythonPackage rec { 9 | pname = "regex"; 10 | version = "2021.11.10"; 11 | 12 | src = fetchPypi { 13 | inherit pname version; 14 | sha256 = "sha256-80HuLfCZm/33qV5EgHXv/g2yEqWTh94acGkOSssD1MY="; 15 | }; 16 | 17 | # Sources for different Python releases are located in same folder 18 | checkPhase = '' 19 | rm -r ${if !isPy27 then "regex_2" else "regex_3"} 20 | ${python.interpreter} -m unittest 21 | ''; 22 | 23 | pythonImportsCheck = [ "regex" ]; 24 | 25 | meta = with lib; { 26 | description = "Alternative regular expression module, to replace re"; 27 | homepage = "https://bitbucket.org/mrabarnett/mrab-regex"; 28 | license = licenses.psfl; 29 | maintainers = with maintainers; [ abbradar ]; 30 | }; 31 | } 32 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/requests.nix: -------------------------------------------------------------------------------- 1 | { lib, stdenv, fetchPypi, buildPythonPackage 2 | , urllib3, idna, chardet, certifi 3 | , pytest }: 4 | 5 | buildPythonPackage rec { 6 | pname = "requests"; 7 | version = "2.25.0"; 8 | 9 | src = fetchPypi { 10 | inherit pname version; 11 | sha256 = "1y6mb8c0ipd64d5axq2p368yxndp3f966hmabjka2q2a5y9hn6kz"; 12 | }; 13 | 14 | propagatedBuildInputs = [ urllib3 idna chardet certifi ]; 15 | # sadly, tests require networking 16 | doCheck = false; 17 | 18 | meta = with lib; { 19 | description = "An Apache2 licensed HTTP library, written in Python, for human beings"; 20 | homepage = "http://docs.python-requests.org/en/latest/"; 21 | license = licenses.asl20; 22 | }; 23 | } 24 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/requests_download.nix: -------------------------------------------------------------------------------- 1 | { lib 2 | , buildPythonPackage 3 | , fetchPypi 4 | , requests 5 | }: 6 | 7 | buildPythonPackage rec { 8 | pname = "requests_download"; 9 | version = "0.1.2"; 10 | 11 | format = "wheel"; 12 | 13 | #src = pkgs.fetchurl { 14 | # url = "https://files.pythonhosted.org/packages/60/af/10f899f0574a81cbc511124c08d7c7dc46c20d4f956a6a3c793ad4330bb4/requests_download-0.1.2-py2.py3-none-any.whl"; 15 | # sha256 = "1ballx1hljpdpyvqzqn79m0dc21z2smrnxk2ylb6dbpg5crrskcr"; 16 | #}; 17 | 18 | src = fetchPypi { 19 | inherit pname version format; 20 | sha256 = "1ballx1hljpdpyvqzqn79m0dc21z2smrnxk2ylb6dbpg5crrskcr"; 21 | }; 22 | 23 | propagatedBuildInputs = [ requests ]; 24 | 25 | meta = { 26 | description = "Download files using requests and save them to a target path"; 27 | homepage = "https://www.github.com/takluyver/requests_download"; 28 | license = lib.licenses.mit; 29 | maintainers = [ lib.maintainers.fridh ]; 30 | }; 31 | } 32 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/responses.nix: -------------------------------------------------------------------------------- 1 | { lib 2 | , buildPythonPackage 3 | , cookies 4 | , fetchPypi 5 | , mock 6 | , pytest-localserver 7 | , pytestCheckHook 8 | , pythonOlder 9 | , requests 10 | , six 11 | , urllib3 12 | }: 13 | 14 | buildPythonPackage rec { 15 | pname = "responses"; 16 | version = "0.16.0"; 17 | 18 | src = fetchPypi { 19 | inherit pname version; 20 | sha256 = "sha256-ouOsoqgnfmElfNOxwVSx3Q14Kxrj04t/o3y+P+tTF5E="; 21 | }; 22 | 23 | propagatedBuildInputs = [ 24 | requests 25 | urllib3 26 | six 27 | ] ++ lib.optionals (pythonOlder "3.4") [ 28 | cookies 29 | ] ++ lib.optionals (pythonOlder "3.3") [ 30 | mock 31 | ]; 32 | 33 | checkInputs = [ 34 | pytest-localserver 35 | pytestCheckHook 36 | ]; 37 | 38 | pythonImportsCheck = [ "responses" ]; 39 | 40 | meta = with lib; { 41 | description = "Python module for mocking out the requests Python library"; 42 | homepage = "https://github.com/getsentry/responses"; 43 | license = licenses.asl20; 44 | maintainers = with maintainers; [ fab ]; 45 | }; 46 | } 47 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/scandir.nix: -------------------------------------------------------------------------------- 1 | { lib, python, buildPythonPackage, fetchPypi }: 2 | 3 | buildPythonPackage rec { 4 | pname = "scandir"; 5 | version = "1.10.0"; 6 | 7 | src = fetchPypi { 8 | inherit pname version; 9 | sha256 ="1bkqwmf056pkchf05ywbnf659wqlp6lljcdb0y88wr9f0vv32ijd"; 10 | }; 11 | 12 | checkPhase = "${python.interpreter} test/run_tests.py"; 13 | 14 | meta = with lib; { 15 | description = "A better directory iterator and faster os.walk()"; 16 | homepage = "https://github.com/benhoyt/scandir"; 17 | license = licenses.gpl3; 18 | maintainers = with maintainers; [ abbradar ]; 19 | }; 20 | } 21 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/service-identity.nix: -------------------------------------------------------------------------------- 1 | { lib 2 | , attrs 3 | , buildPythonPackage 4 | , cryptography 5 | , fetchFromGitHub 6 | , idna 7 | , ipaddress 8 | , pyasn1 9 | , pyasn1-modules 10 | , pytestCheckHook 11 | , pythonOlder 12 | }: 13 | 14 | buildPythonPackage rec { 15 | pname = "service-identity"; 16 | version = "21.1.0"; 17 | 18 | src = fetchFromGitHub { 19 | owner = "pyca"; 20 | repo = pname; 21 | rev = version; 22 | sha256 = "sha256-pWc2rU3ULqEukMhd1ySY58lTm3s8f/ayQ7CY4nG24AQ="; 23 | }; 24 | 25 | propagatedBuildInputs = [ 26 | attrs 27 | cryptography 28 | idna 29 | pyasn1 30 | pyasn1-modules 31 | ] ++ lib.optionals (pythonOlder "3.3") [ 32 | ipaddress 33 | ]; 34 | 35 | checkInputs = [ 36 | pytestCheckHook 37 | ]; 38 | 39 | pythonImportsCheck = [ "service_identity" ]; 40 | 41 | meta = with lib; { 42 | description = "Service identity verification for pyOpenSSL"; 43 | homepage = "https://service-identity.readthedocs.io"; 44 | license = licenses.mit; 45 | maintainers = with maintainers; [ fab ]; 46 | }; 47 | } 48 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/setuptools-scm.nix: -------------------------------------------------------------------------------- 1 | { lib, buildPythonPackage, fetchPypi, toml }: 2 | 3 | buildPythonPackage rec { 4 | pname = "setuptools_scm"; 5 | version = "5.0.2"; 6 | 7 | src = fetchPypi { 8 | inherit pname version; 9 | sha256 = "sha256-g6DO3TRJ45RjB4EaTHudicS1/UZKL7XuzNCluxWK5cg="; 10 | }; 11 | 12 | propagatedBuildInputs = [ toml ]; 13 | 14 | # Requires pytest, circular dependency 15 | doCheck = false; 16 | pythonImportsCheck = [ "setuptools_scm" ]; 17 | 18 | meta = with lib; { 19 | homepage = "https://github.com/pypa/setuptools_scm/"; 20 | description = "Handles managing your python package versions in scm metadata"; 21 | license = licenses.mit; 22 | maintainers = with maintainers; [ SuperSandro2000 ]; 23 | }; 24 | } 25 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/setuptools-tag-date.patch: -------------------------------------------------------------------------------- 1 | diff --git a/setup.cfg b/setup.cfg 2 | index f23714b6..8aaeb330 100644 3 | --- a/setup.cfg 4 | +++ b/setup.cfg 5 | @@ -1,6 +1,6 @@ 6 | [egg_info] 7 | tag_build = .post 8 | -tag_date = 1 9 | +tag_date = 0 10 | 11 | [aliases] 12 | clean_egg_info = egg_info -Db '' 13 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/six.nix: -------------------------------------------------------------------------------- 1 | { lib 2 | , buildPythonPackage 3 | , fetchPypi 4 | , pytest 5 | }: 6 | 7 | buildPythonPackage rec { 8 | pname = "six"; 9 | version = "1.16.0"; 10 | 11 | src = fetchPypi { 12 | inherit pname version; 13 | sha256 = "1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"; 14 | }; 15 | 16 | checkInputs = [ pytest ]; 17 | 18 | checkPhase = '' 19 | py.test test_six.py 20 | ''; 21 | 22 | # To prevent infinite recursion with pytest 23 | doCheck = false; 24 | 25 | meta = { 26 | description = "A Python 2 and 3 compatibility library"; 27 | homepage = "https://pypi.python.org/pypi/six/"; 28 | license = lib.licenses.mit; 29 | }; 30 | } 31 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/sortedcontainers.nix: -------------------------------------------------------------------------------- 1 | { lib 2 | , buildPythonPackage 3 | , fetchPypi 4 | }: 5 | 6 | buildPythonPackage rec { 7 | pname = "sortedcontainers"; 8 | version = "2.4.0"; 9 | 10 | src = fetchPypi { 11 | inherit pname version; 12 | sha256 = "25caa5a06cc30b6b83d11423433f65d1f9d76c4c6a0c90e3379eaa43b9bfdb88"; 13 | }; 14 | 15 | # pypi tarball does not come with tests 16 | doCheck = false; 17 | 18 | meta = { 19 | description = "Python Sorted Container Types: SortedList, SortedDict, and SortedSet"; 20 | homepage = "http://www.grantjenks.com/docs/sortedcontainers/"; 21 | license = lib.licenses.asl20; 22 | maintainers = with lib.maintainers; [ costrouc ]; 23 | }; 24 | } 25 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/testpath.nix: -------------------------------------------------------------------------------- 1 | { lib 2 | , buildPythonPackage 3 | , fetchPypi 4 | , pytestCheckHook 5 | }: 6 | 7 | buildPythonPackage rec { 8 | pname = "testpath"; 9 | version = "0.5.0"; 10 | 11 | src = fetchPypi { 12 | inherit pname version; 13 | sha256 = "05z4s4d5i1ja16hiv4jhqv63fvg1a4vw77s0ay1sw11hrl5pmkqs"; 14 | }; 15 | 16 | checkInputs = [ 17 | pytestCheckHook 18 | ]; 19 | 20 | meta = with lib; { 21 | description = "Test utilities for code working with files and commands"; 22 | license = licenses.mit; 23 | homepage = "https://github.com/jupyter/testpath"; 24 | }; 25 | 26 | } 27 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/toml.nix: -------------------------------------------------------------------------------- 1 | { lib, buildPythonPackage, fetchPypi }: 2 | 3 | buildPythonPackage rec { 4 | pname = "toml"; 5 | version = "0.10.2"; 6 | 7 | src = fetchPypi { 8 | inherit pname version; 9 | sha256 = "b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f"; 10 | }; 11 | 12 | # This package has a test script (built for Travis) that involves a) 13 | # looking in the home directory for a binary test runner and b) using 14 | # git to download a test suite. 15 | doCheck = false; 16 | 17 | meta = with lib; { 18 | description = "a Python library for parsing and creating TOML"; 19 | homepage = "https://github.com/uiri/toml"; 20 | license = licenses.mit; 21 | maintainers = with maintainers; [ twey ]; 22 | }; 23 | } 24 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/tomli-fix-backwards-compatibility-load.patch: -------------------------------------------------------------------------------- 1 | diff --git a/tomli/_parser.py b/tomli/_parser.py 2 | index 89e81c3..6fb1bfd 100644 3 | --- a/tomli/_parser.py 4 | +++ b/tomli/_parser.py 5 | @@ -1,6 +1,6 @@ 6 | import string 7 | from types import MappingProxyType 8 | -from typing import Any, BinaryIO, Dict, FrozenSet, Iterable, NamedTuple, Optional, Tuple 9 | +from typing import IO, Union, Any, BinaryIO, Dict, FrozenSet, Iterable, NamedTuple, Optional, Tuple 10 | import warnings 11 | 12 | from tomli._re import ( 13 | @@ -48,7 +48,7 @@ class TOMLDecodeError(ValueError): 14 | """An error raised if a document is not valid TOML.""" 15 | 16 | 17 | -def load(fp: BinaryIO, *, parse_float: ParseFloat = float) -> Dict[str, Any]: 18 | +def load(fp: Union[IO, BinaryIO], *, parse_float: ParseFloat = float) -> Dict[str, Any]: 19 | """Parse TOML from a binary file object.""" 20 | s_bytes = fp.read() 21 | try: 22 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/tornado.nix: -------------------------------------------------------------------------------- 1 | { lib 2 | , python 3 | , buildPythonPackage 4 | , fetchPypi 5 | , backports_abc ? null 6 | , backports_ssl_match_hostname ? null 7 | , certifi ? null 8 | , singledispatch ? null 9 | , futures ? null 10 | , isPy27 11 | }: 12 | 13 | buildPythonPackage rec { 14 | pname = "tornado"; 15 | version = "4.5.3"; 16 | 17 | propagatedBuildInputs = lib.optionals isPy27 [ backports_abc certifi singledispatch backports_ssl_match_hostname futures ]; 18 | 19 | # We specify the name of the test files to prevent 20 | # https://github.com/NixOS/nixpkgs/issues/14634 21 | checkPhase = '' 22 | ${python.interpreter} -m unittest discover *_test.py 23 | ''; 24 | 25 | src = fetchPypi { 26 | inherit pname version; 27 | sha256 = "02jzd23l4r6fswmwxaica9ldlyc2p6q8dk6dyff7j58fmdzf853d"; 28 | }; 29 | 30 | __darwinAllowLocalNetworking = true; 31 | 32 | meta = { 33 | description = "A web framework and asynchronous networking library"; 34 | homepage = "https://www.tornadoweb.org/"; 35 | license = lib.licenses.asl20; 36 | }; 37 | } 38 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/traceback2.nix: -------------------------------------------------------------------------------- 1 | { lib 2 | , buildPythonPackage 3 | , fetchPypi 4 | , pbr 5 | , linecache2 6 | }: 7 | 8 | buildPythonPackage rec { 9 | version = "1.4.0"; 10 | pname = "traceback2"; 11 | 12 | src = fetchPypi { 13 | inherit pname version; 14 | sha256 = "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"; 15 | }; 16 | 17 | propagatedBuildInputs = [ pbr linecache2 ]; 18 | 19 | # circular dependencies for tests 20 | doCheck = false; 21 | 22 | meta = with lib; { 23 | description = "A backport of traceback to older supported Pythons"; 24 | homepage = "https://pypi.python.org/pypi/traceback2/"; 25 | license = licenses.psfl; 26 | }; 27 | 28 | } 29 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/typed-ast.nix: -------------------------------------------------------------------------------- 1 | { buildPythonPackage, fetchFromGitHub, lib, pythonOlder, pytest }: 2 | 3 | buildPythonPackage rec { 4 | pname = "typed-ast"; 5 | version = "1.5.0"; 6 | disabled = pythonOlder "3.3"; 7 | 8 | src = fetchFromGitHub { 9 | owner = "python"; 10 | repo = "typed_ast"; 11 | rev = version; 12 | sha256 = "sha256-z3l5gMG1Jp6EI7SnGn5ABVXVBi+bK///iJBqEWn4d+s="; 13 | }; 14 | 15 | pythonImportsCheck = [ 16 | "typed_ast" 17 | "typed_ast.ast27" 18 | "typed_ast.ast3" 19 | "typed_ast.conversions" 20 | ]; 21 | 22 | checkInputs = [ 23 | pytest 24 | ]; 25 | 26 | checkPhase = '' 27 | runHook preCheck 28 | 29 | # We can't use pytestCheckHook because that invokes pytest with python -m pytest 30 | # which adds the current directory to sys.path at the beginning. 31 | # _That_ version of the typed_ast module doesn't have the C extensions we need. 32 | pytest 33 | 34 | runHook postCheck 35 | ''; 36 | 37 | meta = with lib; { 38 | homepage = "https://github.com/python/typed_ast"; 39 | description = "Python 2 and 3 ast modules with type comment support"; 40 | license = licenses.asl20; 41 | maintainers = with maintainers; [ SuperSandro2000 ]; 42 | }; 43 | } 44 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/typing-extensions.nix: -------------------------------------------------------------------------------- 1 | { lib, buildPythonPackage, fetchPypi, pythonOlder, isPy3k, python, typing }: 2 | let 3 | testDir = if isPy3k then "src_py3" else "src_py2"; 4 | 5 | in buildPythonPackage rec { 6 | pname = "typing_extensions"; 7 | version = "3.10.0.2"; 8 | 9 | src = fetchPypi { 10 | inherit pname version; 11 | sha256 = "49f75d16ff11f1cd258e1b988ccff82a3ca5570217d7ad8c5f48205dd99a677e"; 12 | }; 13 | 14 | checkInputs = lib.optional (pythonOlder "3.5") typing; 15 | 16 | # Error for Python3.6: ImportError: cannot import name 'ann_module' 17 | # See https://github.com/python/typing/pull/280 18 | doCheck = pythonOlder "3.6"; 19 | 20 | checkPhase = '' 21 | cd ${testDir} 22 | ${python.interpreter} -m unittest discover 23 | ''; 24 | 25 | meta = with lib; { 26 | description = "Backported and Experimental Type Hints for Python 3.5+"; 27 | homepage = "https://github.com/python/typing"; 28 | license = licenses.psfl; 29 | maintainers = with maintainers; [ pmiddend ]; 30 | }; 31 | } 32 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/typing.nix: -------------------------------------------------------------------------------- 1 | { lib, buildPythonPackage, fetchPypi, pythonOlder, isPy3k, isPyPy, python 2 | , pythonAtLeast }: 3 | 4 | let 5 | testDir = if isPy3k then "src" else "python2"; 6 | 7 | in buildPythonPackage rec { 8 | pname = "typing"; 9 | version = "3.10.0.0"; 10 | 11 | src = fetchPypi { 12 | inherit pname version; 13 | sha256 = "13b4ad211f54ddbf93e5901a9967b1e07720c1d1b78d596ac6a439641aa1b130"; 14 | }; 15 | 16 | disabled = pythonAtLeast "3.5"; 17 | 18 | # Error for Python3.6: ImportError: cannot import name 'ann_module' 19 | # See https://github.com/python/typing/pull/280 20 | # Also, don't bother on PyPy: AssertionError: TypeError not raised 21 | doCheck = pythonOlder "3.6" && !isPyPy; 22 | 23 | checkPhase = '' 24 | cd ${testDir} 25 | ${python.interpreter} -m unittest discover 26 | ''; 27 | 28 | meta = with lib; { 29 | description = "Backport of typing module to Python versions older than 3.5"; 30 | homepage = "https://docs.python.org/3/library/typing.html"; 31 | license = licenses.psfl; 32 | }; 33 | } 34 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/unittest2.nix: -------------------------------------------------------------------------------- 1 | { lib 2 | , buildPythonPackage 3 | , fetchPypi 4 | , six 5 | , traceback2 6 | }: 7 | 8 | buildPythonPackage rec { 9 | version = "1.1.0"; 10 | pname = "unittest2"; 11 | 12 | src = fetchPypi { 13 | inherit pname version; 14 | sha256 = "0y855kmx7a8rnf81d3lh5lyxai1908xjp0laf4glwa4c8472m212"; 15 | }; 16 | 17 | propagatedBuildInputs = [ six traceback2 ]; 18 | 19 | # # 1.0.0 and up create a circle dependency with traceback2/pbr 20 | doCheck = false; 21 | 22 | postPatch = '' 23 | # argparse is needed for python < 2.7, which we do not support anymore. 24 | substituteInPlace setup.py --replace "argparse" "" 25 | 26 | # # fixes a transient error when collecting tests, see https://bugs.launchpad.net/python-neutronclient/+bug/1508547 27 | sed -i '510i\ return None, False' unittest2/loader.py 28 | # https://github.com/pypa/packaging/pull/36 29 | sed -i 's/version=VERSION/version=str(VERSION)/' setup.py 30 | ''; 31 | 32 | meta = with lib; { 33 | description = "A backport of the new features added to the unittest testing framework"; 34 | homepage = "https://pypi.python.org/pypi/unittest2"; 35 | license = licenses.bsd0; 36 | }; 37 | 38 | } 39 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/wcwidth.nix: -------------------------------------------------------------------------------- 1 | { lib, fetchPypi, buildPythonPackage, pytestCheckHook 2 | , isPy3k 3 | , backports_functools_lru_cache 4 | , setuptools 5 | }: 6 | 7 | buildPythonPackage rec { 8 | pname = "wcwidth"; 9 | version = "0.2.5"; 10 | 11 | src = fetchPypi { 12 | inherit pname version; 13 | sha256 = "c4d647b99872929fdb7bdcaa4fbe7f01413ed3d98077df798530e5b04f116c83"; 14 | }; 15 | 16 | checkInputs = [ pytestCheckHook ]; 17 | 18 | propagatedBuildInputs = [ setuptools ] ++ lib.optionals (!isPy3k) [ 19 | backports_functools_lru_cache 20 | ]; 21 | 22 | # To prevent infinite recursion with pytest 23 | doCheck = false; 24 | 25 | meta = with lib; { 26 | description = "Measures number of Terminal column cells of wide-character codes"; 27 | longDescription = '' 28 | This API is mainly for Terminal Emulator implementors -- any Python 29 | program that attempts to determine the printable width of a string on 30 | a Terminal. It is implemented in python (no C library calls) and has 31 | no 3rd-party dependencies. 32 | ''; 33 | homepage = "https://github.com/jquast/wcwidth"; 34 | license = licenses.mit; 35 | }; 36 | } 37 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/wptserve.nix: -------------------------------------------------------------------------------- 1 | { lib 2 | , buildPythonPackage 3 | , fetchPypi 4 | , six, h2 5 | , isPy3k 6 | }: 7 | 8 | buildPythonPackage rec { 9 | pname = "wptserve"; 10 | version = "3.0"; 11 | 12 | disabled = isPy3k; 13 | 14 | src = fetchPypi { 15 | inherit pname version; 16 | sha256 = "11990a92b07e4535c2723c34a88bd905c66acec9cda6efa7a7b61371bfe8d87a"; 17 | }; 18 | 19 | postPatch = '' 20 | substituteInPlace setup.py --replace "h2==" "h2>=" 21 | ''; 22 | 23 | propagatedBuildInputs = [ six h2 ]; 24 | 25 | meta = { 26 | description = "A webserver intended for web browser testing"; 27 | homepage = "https://wptserve.readthedocs.org/"; 28 | license = lib.licenses.bsd3; 29 | maintainers = with lib.maintainers; [ raskin ]; 30 | }; 31 | } 32 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/yarl.nix: -------------------------------------------------------------------------------- 1 | { lib 2 | , buildPythonPackage 3 | , fetchPypi 4 | , pythonOlder 5 | , idna 6 | , multidict 7 | , typing-extensions 8 | , pytestCheckHook 9 | }: 10 | 11 | buildPythonPackage rec { 12 | pname = "yarl"; 13 | version = "1.7.2"; 14 | 15 | src = fetchPypi { 16 | inherit pname version; 17 | sha256 = "sha256-RTmbRtYMJTMnpGDpmFZ1IAn87l9dPICy98DK4cONVt0="; 18 | }; 19 | 20 | postPatch = '' 21 | sed -i '/^addopts/d' setup.cfg 22 | ''; 23 | 24 | propagatedBuildInputs = [ 25 | idna 26 | multidict 27 | ] ++ lib.optionals (pythonOlder "3.8") [ 28 | typing-extensions 29 | ]; 30 | 31 | preCheck = '' 32 | # don't import yarl from ./ so the C extension is available 33 | pushd tests 34 | ''; 35 | 36 | checkInputs = [ 37 | pytestCheckHook 38 | ]; 39 | 40 | postCheck = '' 41 | popd 42 | ''; 43 | 44 | pythonImportsCheck = [ "yarl" ]; 45 | 46 | meta = with lib; { 47 | description = "Yet another URL library"; 48 | homepage = "https://github.com/aio-libs/yarl"; 49 | license = licenses.asl20; 50 | maintainers = with maintainers; [ dotlambda ]; 51 | }; 52 | } 53 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/zipfile36.nix: -------------------------------------------------------------------------------- 1 | { lib 2 | , buildPythonPackage 3 | , fetchPypi 4 | , python 5 | , isPy3k 6 | , pythonOlder 7 | }: 8 | 9 | buildPythonPackage rec { 10 | pname = "zipfile36"; 11 | version = "0.1.3"; 12 | 13 | src = fetchPypi { 14 | inherit pname version; 15 | sha256 = "a78a8dddf4fa114f7fe73df76ffcce7538e23433b7a6a96c1c904023f122aead"; 16 | }; 17 | 18 | checkPhase = '' 19 | ${python.interpreter} -m unittest test_zipfile.py 20 | ''; 21 | 22 | # Only works with Python 3.x. 23 | # Not supposed to be used with 3.6 and up. 24 | disabled = !(isPy3k && (pythonOlder "3.6")); 25 | 26 | meta = { 27 | description = "Read and write ZIP files - backport of the zipfile module from Python 3.6"; 28 | homepage = "https://gitlab.com/takluyver/zipfile36"; 29 | license = lib.licenses.psfl; 30 | maintainers = lib.maintainers.fridh; 31 | }; 32 | } 33 | -------------------------------------------------------------------------------- /lang-os/marionette-harness/zipp.nix: -------------------------------------------------------------------------------- 1 | { lib 2 | , buildPythonPackage 3 | , fetchPypi 4 | , setuptools-scm 5 | , pytest 6 | , pytest-flake8 7 | , more-itertools 8 | }: 9 | 10 | buildPythonPackage rec { 11 | pname = "zipp"; 12 | version = "1.0.0"; 13 | 14 | src = fetchPypi { 15 | inherit pname version; 16 | sha256 = "0v3qayhqv7vyzydpydwcp51bqciw8p2ajddw68x5k8zppc0vx3yk"; 17 | }; 18 | 19 | nativeBuildInputs = [ setuptools-scm ]; 20 | 21 | propagatedBuildInputs = [ more-itertools ]; 22 | 23 | checkInputs = [ pytest pytest-flake8 ]; 24 | 25 | checkPhase = '' 26 | pytest 27 | ''; 28 | 29 | # Prevent infinite recursion with pytest 30 | doCheck = false; 31 | 32 | meta = with lib; { 33 | description = "Pathlib-compatible object wrapper for zip files"; 34 | homepage = "https://github.com/jaraco/zipp"; 35 | license = licenses.mit; 36 | }; 37 | } 38 | -------------------------------------------------------------------------------- /lang-os/modprobe.conf: -------------------------------------------------------------------------------- 1 | blacklist evbug 2 | blacklist pstore 3 | blacklist efi-pstore 4 | 5 | -------------------------------------------------------------------------------- /lang-os/rlwrap-user-shell.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | if test -z "$NO_RLWRAP" && which rlwrap &> /dev/null; then 3 | touch ~/.user-lisp-shell_history 4 | history="$(mktemp ~/.user-lisp-shell_history.XXXXXXXX)" 5 | cat ~/.user-lisp-shell_history > "$history" 6 | rlwrap -C user-lisp-shell -D 2 -s 1000000 -H "$history" -f . -c -e '' -b "'\"() " -q "\"" "$@" 7 | cat "$history" >> ~/.user-lisp-shell_history 8 | cat ~/.user-lisp-shell_history | sort | uniq > ~/.user-lisp-shell_history.new 9 | mv ~/.user-lisp-shell_history.new ~/.user-lisp-shell_history 10 | rm "$history" 11 | else 12 | "$@" 13 | fi 14 | -------------------------------------------------------------------------------- /lang-os/run-user-shell.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | export NIX_LISP_ASDF_LOAD='(require :asdf)' 3 | export NIX_LISP_COMMAND=sbcl 4 | export LISP_OS_HELPERS_PACKAGE="${LISP_OS_HELPERS_PACKAGE:-/var/current-system/sw}" 5 | export USER_LISP_SHELL_RC="${USER_LISP_SHELL_RC:-$HOME/.user-lisp-shell}" 6 | 7 | for i in "$LISP_OS_HELPERS_PACKAGE/lib/common-lisp-settings"/*-path-config.sh; do 8 | source "$i"; 9 | done 10 | 11 | "$(dirname "$0")"/rlwrap-user-shell.sh common-lisp.sh --eval \ 12 | '(defvar *lisp-os-helpers-package* 13 | (uiop:getenv "LISP_OS_HELPERS_PACKAGE"))' \ 14 | --load "$USER_LISP_SHELL_RC" "$@" 15 | -------------------------------------------------------------------------------- /lang-os/send-to-user-lisp-shell-evaluator.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | socat -t 60 stdio /run/user/$UID/user-lisp-evaluator/socket; 4 | -------------------------------------------------------------------------------- /lang-os/spawn-getty.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | export CONSOLE_DEVICE="/dev/tty$1" 4 | chmod 0600 "$CONSOLE_DEVICE" 5 | setfacl -b "$CONSOLE_DEVICE" 6 | chown root "$CONSOLE_DEVICE" 7 | if test -n "$2"; then 8 | export FAKE_SHELL="$2" 9 | fi 10 | setsid -w agetty tty$1 -8 -l /run/current-system/bin/use-console 11 | chmod 0600 "$CONSOLE_DEVICE" 12 | setfacl -b "$CONSOLE_DEVICE" 13 | chown root "$CONSOLE_DEVICE" 14 | -------------------------------------------------------------------------------- /lang-os/stumpwm/wse-props.lisp: -------------------------------------------------------------------------------- 1 | (in-package :stumpwm) 2 | 3 | (defun raw-window-prop (w name) 4 | (xlib:get-property 5 | (window-xwin w) 6 | (intern (cl-ppcre:regex-replace-all 7 | "-" (string-upcase name) "_") :keyword))) 8 | 9 | (defun window-prop-int (w name) 10 | (first (raw-window-prop w name))) 11 | 12 | (defun window-prop-string (w name) 13 | (map 'string 'code-char (raw-window-prop w name))) 14 | 15 | (defun window-prop-strings (w name) 16 | (cl-ppcre:split #\Null (window-prop-string w name))) 17 | 18 | (defun window-prop-int-p (w name value) 19 | (equal (window-prop-int w name) value)) 20 | 21 | (defun window-prop-string-p (w name value) 22 | (equal (window-prop-string w name) value)) 23 | 24 | (defun window-hostname (w) 25 | (window-prop-string w :wm-client-machine)) 26 | 27 | (defun window-pid (w) 28 | (window-prop-int w :-net-wm-pid)) 29 | 30 | (defun window-hostname-p (w value) 31 | (equal (window-hostname w) value)) 32 | 33 | (defun window-pid-p (w value) 34 | (equal (window-pid w) value)) 35 | 36 | (defun window-locale (w) 37 | (window-prop-string w :wm-locale-name)) 38 | 39 | (defun window-command (w) 40 | (window-prop-strings w :wm-command)) 41 | -------------------------------------------------------------------------------- /lang-os/system-gerbil.nix: -------------------------------------------------------------------------------- 1 | { 2 | pkgs ? import {} 3 | , tty ? "tty12" 4 | , code ? ''(begin (print "Hello from Gerbil. Time is ") (print (time->seconds (current-time))) (print "\n") (thread-sleep! 10.2))'' 5 | , deps ? [] 6 | }: 7 | pkgs.writeScript "system-gerbil-launcher" '' 8 | ( 9 | ${ 10 | pkgs.lib.concatMapStrings 11 | (s: ''export GERBIL_LOADPATH="$GERBIL_LOADPATH''${GERBIL_LOADPATH:+:}${s}"; '') 12 | deps 13 | } 14 | "${pkgs.gerbil}/bin/gxi" -e '(load "${pkgs.writeText "system-gerbil-script.scm" code}")' < /dev/null &>/dev/${tty} 15 | ) 16 | '' 17 | -------------------------------------------------------------------------------- /lang-os/system-gerbil.scm: -------------------------------------------------------------------------------- 1 | (begin (print "Hello from Gerbil. Time is ") (print (time->seconds (current-time))) (print "\n") (thread-sleep! 300)) 2 | -------------------------------------------------------------------------------- /lang-os/system-global.nix: -------------------------------------------------------------------------------- 1 | { 2 | pkgs ? import {}, systemEtc 3 | }: 4 | pkgs.runCommand "system-global" {} '' 5 | mkdir "$out" 6 | cd "$out" 7 | ln -s "${systemEtc}" etc 8 | mkdir -p bin usr/bin 9 | ln -s "${pkgs.bash}/bin/sh" "bin/sh" 10 | ln -s "${pkgs.coreutils}/bin/env" "usr/bin/env" 11 | '' 12 | -------------------------------------------------------------------------------- /lang-os/system-guile.nix: -------------------------------------------------------------------------------- 1 | { 2 | pkgs ? import {} 3 | , tty ? "tty12" 4 | , code ? ''(begin (display "Hello from Guile. Time is ") (display (car now)) (display "\n") (sleep 10.3))'' 5 | , deps ? [] 6 | }: 7 | pkgs.writeScript "system-guile-launcher" '' 8 | ( 9 | ${ 10 | pkgs.lib.concatMapStrings 11 | (s: ''export GUILE_LOAD_PATH="$GUILE_LOAD_PATH''${GUILE_LOAD_PATH:+:}${s}"; '') 12 | deps 13 | } 14 | "${pkgs.guile}/bin/guile" -e '(load "${pkgs.writeText "system-guile-script.scm" code}")' < /dev/null &>/dev/${tty} 15 | ) 16 | '' 17 | -------------------------------------------------------------------------------- /lang-os/system-lisp.nix: -------------------------------------------------------------------------------- 1 | { 2 | pkgs ? import {} 3 | , tty ? "tty12" 4 | , code ? ''(progn (format t "Hello from Common Lisp. Time is: ~s~%" (get-universal-time)) (sleep 10.1))'' 5 | , deps ? [] 6 | }: 7 | pkgs.writeScript "system-lisp-launcher" '' 8 | ( 9 | export LANG=C.UTF-8 10 | export LOCALE_ARCHIVE=/var/current-system/sw/lib/locale/locale-archive 11 | ulimit -n 4096 12 | ulimit -n 65536 13 | ${pkgs.sbcl.withPackages (p: deps)}/bin/sbcl $NIX_LISP_EARLY_OPTIONS --noinform --dynamic-space-size 2048 --eval '(require :asdf)' --eval '(require :sb-posix)' --eval '(require :sb-bsd-sockets)' --load "${pkgs.writeText "system-lisp-script.lisp" code}" < /dev/null &>/dev/${tty} 14 | ) 15 | '' 16 | -------------------------------------------------------------------------------- /lang-os/system-sw-pieces.nix: -------------------------------------------------------------------------------- 1 | { 2 | pkgs ? import {} 3 | }: 4 | { 5 | corePackages = with pkgs; [ 6 | coreutils util-linux grub2_efi bashInteractive nix shadow 7 | iproute2 openssh curl procps gnugrep gnused gptfdisk 8 | cpio kea dhcpcd less nettools iw wpa_supplicant findutils 9 | parted gzip bzip2 xz e2fsprogs dosfstools glibc gnutar 10 | psmisc pam kbd lynx fuse fuse3 ncurses acl eudev kmod git 11 | strace efibootmgr gcc binutils socat rlwrap fbterm which 12 | sqlite 13 | ]; 14 | allOutputNames = l: builtins.attrNames 15 | (pkgs.lib.fold 16 | (a: b: b // 17 | (builtins.listToAttrs (map (x: {name = x; value = x;}) a.outputs or ["out"]))) 18 | {} l); 19 | cProgram = name: cfile: buildInputs: flags: pkgs.runCommandCC name { inherit buildInputs; } '' 20 | mkdir -p "$out/bin" 21 | cc "${cfile}" ${builtins.toString flags} -o "$out/bin/${name}" -Wall -Werror -Wpedantic 22 | ''; 23 | } 24 | -------------------------------------------------------------------------------- /lang-os/use-console.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | if test "$1" = "--"; then shift; fi 3 | if test -z "$1"; then 4 | echo -n "$(hostname) login: " 5 | read user 6 | shift 7 | exec "$0" "$user" "$@" 8 | fi 9 | test -n "$CONSOLE_DEVICE" && chown "$1" "$CONSOLE_DEVICE" 10 | chown "$1" "$(tty)" 11 | mkdir -p /run/user/$(id -u "$1") 12 | chown "$1" -R /run/user/$(id -u "$1") 13 | chmod u+rwx /run/user/$(id -u "$1") 14 | mkdir -p /nix/var/nix/profiles/per-user/"$1" 15 | chown "$1" /nix/var/nix/profiles/per-user/"$1" 16 | chmod u+rwx /nix/var/nix/profiles/per-user/"$1" 17 | mkdir -p /nix/var/nix/gcroots/per-user/"$1" 18 | chown "$1" /nix/var/nix/gcroots/per-user/"$1" 19 | chmod u+rwx /nix/var/nix/gcroots/per-user/"$1" 20 | unset "CONSOLE_DEVICE" 21 | exec login "$1" 22 | #exec /run/current-system/sw/bin/su nobody -s /bin/sh -c "/run/wrappers/bin/su -l '$1' ${2:+-c '$2'}" 23 | -------------------------------------------------------------------------------- /lang-os/user/firefox-profile-skel-natural/chrome/userChrome.css: -------------------------------------------------------------------------------- 1 | @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); 2 | 3 | #tabbrowser-tabs:not(:hover) { 4 | background-color: magenta !important; 5 | height: 3px !important; 6 | min-height: 3px !important; 7 | max-height: 3px !important; 8 | overflow: hidden !important; 9 | } 10 | 11 | #nav-bar :focus{ 12 | background-color: cyan !important; 13 | color: red !important; 14 | } 15 | 16 | #main-window:not([customizing]) #nav-bar:not(:focus-within):not(:hover) { 17 | background-color: cyan !important; 18 | height: 3px !important; 19 | min-height: 3px !important; 20 | max-height: 3px !important; 21 | overflow: hidden !important; 22 | } 23 | 24 | -------------------------------------------------------------------------------- /lang-os/user/firefox-profile-skel-noconfig/chrome/userChrome.css: -------------------------------------------------------------------------------- 1 | @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); 2 | 3 | #tabbrowser-tabs:not(:hover) { 4 | background-color: magenta !important; 5 | height: 3px !important; 6 | min-height: 3px !important; 7 | max-height: 3px !important; 8 | overflow: hidden !important; 9 | } 10 | 11 | #nav-bar :focus{ 12 | background-color: cyan !important; 13 | color: red !important; 14 | } 15 | 16 | #main-window:not([customizing]) #nav-bar:not(:focus-within):not(:hover) { 17 | background-color: cyan !important; 18 | height: 3px !important; 19 | min-height: 3px !important; 20 | max-height: 3px !important; 21 | overflow: hidden !important; 22 | } 23 | 24 | -------------------------------------------------------------------------------- /lang-os/user/firefox-profile-skel/chrome/userChrome.css: -------------------------------------------------------------------------------- 1 | @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); 2 | 3 | #tabbrowser-tabs:not(:hover) { 4 | background-color: magenta !important; 5 | height: 3px !important; 6 | min-height: 3px !important; 7 | max-height: 3px !important; 8 | overflow: hidden !important; 9 | } 10 | 11 | #nav-bar :focus{ 12 | background-color: cyan !important; 13 | color: red !important; 14 | } 15 | 16 | #main-window:not([customizing]) #nav-bar:not(:focus-within):not(:hover) { 17 | background-color: cyan !important; 18 | height: 3px !important; 19 | min-height: 3px !important; 20 | max-height: 3px !important; 21 | overflow: hidden !important; 22 | } 23 | 24 | -------------------------------------------------------------------------------- /lang-os/user/profile: -------------------------------------------------------------------------------- 1 | export EDITOR=vim 2 | export NIX_PATH="$HOME" 3 | -------------------------------------------------------------------------------- /lang-os/user/tools.nix: -------------------------------------------------------------------------------- 1 | rec { 2 | pkgs = import {}; 3 | firefoxProfile = import ../firefox-profile.nix { 4 | inherit pkgs; 5 | finalContent = "" + ./firefox-profile-skel; 6 | }; 7 | firefoxLauncherSet = import ../wrapped-firefox-launcher.nix { 8 | inherit pkgs; 9 | baseProfile = firefoxProfile; 10 | }; 11 | inherit (firefoxLauncherSet) firefoxLauncher; 12 | } 13 | -------------------------------------------------------------------------------- /lang-os/user/user-shell.nix: -------------------------------------------------------------------------------- 1 | { 2 | system ? (import ../local/test-system.nix {}) 3 | , src ? ./. 4 | , loadrc ? src: "(load \"${src}/user-shell.lisp\")" 5 | , rcpath ? "/dev/null" 6 | }: rec { 7 | pkgs = system.pkgs; 8 | user-shell = pkgs.stdenv.mkDerivation { 9 | pname = "user-shell"; 10 | version = "0.0.0"; 11 | 12 | src = src; 13 | 14 | propagatedBuildInputs = [ system.lispOsHelpers ]; 15 | 16 | dontBuild = true; 17 | dontStrip = true; 18 | 19 | ASDF_OUTPUT_TRANSLATIONS = "${builtins.storeDir}/:${builtins.storeDir}"; 20 | USER_LISP_SHELL_RC = rcpath; 21 | 22 | installPhase = '' 23 | mkdir -p "$out/bin" 24 | ${pkgs.sbcl.withPackages (p: with p; [system.lispOsHelpers])}/bin/sbcl --eval '(require :asdf)' --eval '(ignore-errors 25 | (asdf:load-system :lisp-os-helpers) 26 | ${loadrc src} 27 | (format *error-output* "~s~%" (list *package* `lisp-shell-init)) 28 | (funcall (find-symbol "BUILD-SHELL" 29 | (find-package "LISP-OS-HELPERS/USER-ABBREVIATIONS")) 30 | "'"$out"'/bin/user-lisp-shell") 31 | )' 32 | test -x "$out/bin/user-lisp-shell" 33 | ''; 34 | }; 35 | } 36 | -------------------------------------------------------------------------------- /large-initrd-demo/hello.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main () { 4 | fprintf(stdout, "Hello.\n"); 5 | while(1); 6 | return 0; 7 | } 8 | -------------------------------------------------------------------------------- /large-initrd-demo/packages.nix: -------------------------------------------------------------------------------- 1 | {pkgs ? (import {})}: 2 | with pkgs; 3 | pkgs // 4 | rec { 5 | glibSmall = lib.overrideDerivation (glib.override { 6 | perl = null; 7 | }) (x: {postInstall = (x.postInstall or "") +'' 8 | rm "$out/bin"/{gdbus-codegen,gtester-report} 9 | '';}); 10 | vimTiny = vimNox.override{ 11 | source = "vim-nox"; 12 | features = "tiny"; 13 | config = { 14 | vim = { 15 | lua = false; 16 | ruby = false; 17 | perl = false; 18 | python = false; 19 | tcl = false; 20 | multibyte = true; 21 | cscope = false; 22 | }; 23 | }; 24 | libX11 = null; 25 | gtk = null; 26 | glib = null; 27 | flags = ["noX11"]; 28 | gui = "none"; 29 | }; 30 | eudevSmall = eudev.override{ 31 | glib = glibSmall; 32 | }; 33 | lvm2Small = lvm2.override { 34 | udev = eudevSmall; 35 | }; 36 | } 37 | -------------------------------------------------------------------------------- /lesser-expressions/curl-impersonate-fork/curl-impersonate-0.5.2-fix-shebangs.patch: -------------------------------------------------------------------------------- 1 | diff --git a/Makefile.in b/Makefile.in 2 | index 877c54f..3e39ed1 100644 3 | --- a/Makefile.in 4 | +++ b/Makefile.in 5 | @@ -209,6 +209,8 @@ $(NSS_VERSION).tar.gz: 6 | 7 | $(nss_static_libs): $(NSS_VERSION).tar.gz 8 | tar xf $(NSS_VERSION).tar.gz 9 | + sed -i -e "1s@#!/usr/bin/env bash@#!$$(type -p bash)@" $(NSS_VERSION)/nss/build.sh 10 | + sed -i -e "s@/usr/bin/env grep@$$(type -p grep)@" $(NSS_VERSION)/nss/coreconf/config.gypi 11 | 12 | ifeq ($(host),$(build)) 13 | # Native build, use NSS' build script. 14 | -------------------------------------------------------------------------------- /lesser-expressions/curl-impersonate-fork/deps.nix: -------------------------------------------------------------------------------- 1 | # Generated by update.sh 2 | { fetchurl }: 3 | 4 | { 5 | "curl-8.1.1.tar.xz" = fetchurl { 6 | url = "https://curl.se/download/curl-8.1.1.tar.xz"; 7 | hash = "sha256-CKlI4GGSlkVZfB73GU4HswiyIIT/A/p0ALRl5sBRSeU="; 8 | }; 9 | 10 | "brotli-1.0.9.tar.gz" = fetchurl { 11 | url = "https://github.com/google/brotli/archive/refs/tags/v1.0.9.tar.gz"; 12 | hash = "sha256-+ejYHQQFumbRgVKa9CozVPg4yTkJX/mZMNpqqc32/kY="; 13 | }; 14 | 15 | "nss-3.92.tar.gz" = fetchurl { 16 | url = "https://ftp.mozilla.org/pub/security/nss/releases/NSS_3_92_RTM/src/nss-3.92-with-nspr-4.35.tar.gz"; 17 | hash = "sha256-IcF2v/+27IQLX5hcf48BRoL0ovtVsGkkc0Fy1cBIbcU="; 18 | }; 19 | 20 | "boringssl.zip" = fetchurl { 21 | url = "https://github.com/google/boringssl/archive/d24a38200fef19150eef00cad35b138936c08767.zip"; 22 | hash = "sha256-tzAAwL70VAyUEOZZ86ql+RgXsw4DZhkvW5l0d1eVVHU="; 23 | }; 24 | 25 | "nghttp2-1.56.0.tar.bz2" = fetchurl { 26 | url = "https://github.com/nghttp2/nghttp2/releases/download/v1.56.0/nghttp2-1.56.0.tar.bz2"; 27 | hash = "sha256-L13Nv1d6LfUTokZGRUhMw10uTQczZT1jGTrlHbQd70E=50;33M"; 28 | }; 29 | } 30 | -------------------------------------------------------------------------------- /lesser-expressions/default.conf: -------------------------------------------------------------------------------- 1 | smaller 2 | -------------------------------------------------------------------------------- /lesser-expressions/flask_inputs/requirements_frozen.txt: -------------------------------------------------------------------------------- 1 | Click==7.0 2 | Flask==1.1.1 3 | Flask-Inputs==0.2.0 4 | itsdangerous==1.1.0 5 | Jinja2==2.10.3 6 | MarkupSafe==1.1.1 7 | Werkzeug==0.16.0 8 | WTForms==2.2.1 9 | -------------------------------------------------------------------------------- /lesser-expressions/flask_inputs/requirements_override.nix: -------------------------------------------------------------------------------- 1 | { pkgs, python }: 2 | 3 | self: super: { 4 | 5 | } -------------------------------------------------------------------------------- /lesser-expressions/hydra-grab.conf: -------------------------------------------------------------------------------- 1 | chromium 2 | libreoffice 3 | sage 4 | qutebrowser 5 | clasp-common-lisp 6 | -------------------------------------------------------------------------------- /lesser-expressions/importlib_metadata/requirements_frozen.txt: -------------------------------------------------------------------------------- 1 | configparser==4.0.2 2 | contextlib2==0.6.0.post1 3 | importlib-metadata==0.23 4 | more-itertools==5.0.0 5 | pathlib2==2.3.5 6 | scandir==1.10.0 7 | setuptools-scm==3.3.3 8 | six==1.12.0 9 | zipp==0.6.0 10 | -------------------------------------------------------------------------------- /lesser-expressions/importlib_metadata/requirements_override.nix: -------------------------------------------------------------------------------- 1 | { pkgs, python }: 2 | 3 | self: super: { 4 | 5 | } -------------------------------------------------------------------------------- /lesser-expressions/mautrix-telegram/requirements_frozen.txt: -------------------------------------------------------------------------------- 1 | aiohttp==3.6.2 2 | alembic==1.3.1 3 | async-timeout==3.0.1 4 | attrs==19.3.0 5 | cffi==1.13.2 6 | chardet==3.0.4 7 | commonmark==0.9.1 8 | file==0.3.0 9 | future-fstrings==1.2.0 10 | idna==2.8 11 | libmagic==1.0 12 | Mako==1.1.0 13 | MarkupSafe==1.1.1 14 | mautrix-appservice==0.3.11 15 | mautrix-telegram==0.6.1 16 | multidict==4.6.1 17 | pyaes==1.6.1 18 | pyasn1==0.4.8 19 | pycparser==2.19 20 | pytest-runner==5.2 21 | python-dateutil==2.8.1 22 | python-editor==1.0.4 23 | python-magic==0.4.15 24 | rsa==4.0 25 | ruamel.yaml==0.15.100 26 | setuptools-scm==3.3.3 27 | six==1.13.0 28 | SQLAlchemy==1.3.11 29 | Telethon==1.9.0 30 | telethon-session-sqlalchemy==0.2.15 31 | yarl==1.4.1 32 | -------------------------------------------------------------------------------- /lesser-expressions/mautrix-telegram/requirements_override.nix: -------------------------------------------------------------------------------- 1 | { pkgs, python }: 2 | 3 | self: super: { 4 | mautrix-telegram = super.mautrix-telegram.override (x: { 5 | propagatedBuildInputs = x.propagatedBuildInputs ++ [ 6 | self.pytest-runner 7 | self.libmagic 8 | ]; 9 | }); 10 | python-magic = super.python-magic.override (x: { 11 | patchPhase = '' 12 | sed -e "s@dll = .*@dll = '${pkgs.file}/lib/libmagic${pkgs.stdenv.hostPlatform.extensions.sharedLibrary}'@" -i magic.py 13 | ''; 14 | }); 15 | } 16 | -------------------------------------------------------------------------------- /lesser-expressions/ollama-vulkan.nix: -------------------------------------------------------------------------------- 1 | { ollama, fetchFromGitHub, vulkan-loader, vulkan-headers, shaderc, libcap }: 2 | ollama.overrideAttrs (x: { 3 | pname = "ollama-vulkan"; 4 | version = "0.6.2-untagged-2025-03-23"; 5 | 6 | src = fetchFromGitHub { 7 | owner = "grinco"; 8 | repo = "ollama-vulkan"; 9 | rev = "45dbd1464542a197f3b0af54f0ccd68b39fb2c1e"; 10 | hash = "sha256-2cTPSJ1V/tN0Hy87Y6KGj6X+Pm/RwbrjAVqqkvWTOiA="; 11 | }; 12 | 13 | vendorHash = "sha256-Zpzn2YWpiDAl4cwgrrSpN8CFy4GqqhE1mWsRxtYwdDA="; 14 | 15 | nativeBuildInputs = x.nativeBuildInputs ++ [ 16 | shaderc 17 | ]; 18 | 19 | buildInputs = x.buildInputs ++ [ 20 | vulkan-loader vulkan-headers libcap 21 | ]; 22 | }) 23 | -------------------------------------------------------------------------------- /lesser-expressions/openjml.nix: -------------------------------------------------------------------------------- 1 | let pkgs = (import {}); in 2 | pkgs.lib.makeExtensible (self: with self; { 3 | inherit pkgs; 4 | openjml-binary-archive = pkgs.fetchurl { 5 | url = "https://github.com/OpenJML/OpenJML/releases/download/21-0.6/openjml-ubuntu-22.04-21-0.6.zip"; 6 | hash = "sha256-C2nk9tcoJtyMtUzVTRrhMsafRuotHAtwfvo7q5Pi0IE="; 7 | }; 8 | openjml-binary-set = pkgs.runCommandNoCC "openjml" {} '' 9 | mkdir -p "$out/openjml" 10 | cd "$out/openjml" 11 | ${pkgs.lib.getExe pkgs.unzip} "${openjml-binary-archive}" 12 | patchShebangs * 13 | mkdir "$out/bin" 14 | find "$out/openjml" -type f -perm /0100 -maxdepth 1 -exec ln -s '{}' "$out/bin" ';' 15 | ( grep -rl '/lib64/ld-linux-x86-64[.]so[.]2' "$out/openjml" ) | xargs -l1 "${pkgs.lib.getExe pkgs.patchelf}" --set-interpreter "${pkgs.glibc}/lib64/ld-linux-x86-64.so.2" --set-rpath "${pkgs.lib.makeLibraryPath [pkgs.zlib "${placeholder "out"}/openjml/jdk" pkgs.gcc.cc]}" 16 | ( find "$out/openjml" -name '*.so' -type f ) | xargs -l1 "${pkgs.lib.getExe pkgs.patchelf}" --set-rpath "${pkgs.lib.makeLibraryPath [pkgs.zlib "${placeholder "out"}/openjml/jdk" pkgs.gcc.cc]}" 17 | ''; 18 | }) 19 | -------------------------------------------------------------------------------- /lesser-expressions/package-sets-for-morefine/build-llama-cpp-version.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | nix-build -E 'with import {}; ((llama-cpp.override (x: {vulkanSupport = true;})).overrideAttrs (x: { version = "'"$1"'";})).overrideAttrs (x: { src = x.src.override {hash = "'"${2:-\${lib.fakeHash}}"'";};})' --no-out-link 3 | 4 | -------------------------------------------------------------------------------- /lesser-expressions/package-sets-for-morefine/default.conf: -------------------------------------------------------------------------------- 1 | smaller 2 | -------------------------------------------------------------------------------- /lesser-expressions/plastex/requirements_frozen.txt: -------------------------------------------------------------------------------- 1 | plasTeX==1.0 2 | -------------------------------------------------------------------------------- /lesser-expressions/plastex/requirements_override.nix: -------------------------------------------------------------------------------- 1 | { pkgs, python }: 2 | 3 | self: super: { 4 | plastex = super.plastex.override (x: { 5 | sourceRoot = "plasTeX-1.0.0"; 6 | }); 7 | } 8 | -------------------------------------------------------------------------------- /lesser-expressions/qvge/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | lib, 3 | stdenv, 4 | fetchFromGitHub, 5 | replaceVars, 6 | wrapQtAppsHook, 7 | qmake, 8 | qtsvg, 9 | qtx11extras, 10 | graphviz, 11 | }: 12 | 13 | stdenv.mkDerivation rec { 14 | pname = "qvge"; 15 | version = "0.6.3-untagged-2024-01-08"; 16 | 17 | src = fetchFromGitHub { 18 | owner = "ArsMasiuk"; 19 | repo = pname; 20 | #tag = "v${version}"; 21 | rev = "5751948358d407673cfda10f52892683be143d42"; 22 | sha256 = "sha256-Rh8ahS/9x2aWu4THjLKoog58+yJoCQ6GETaAQTW4Hq8="; 23 | }; 24 | 25 | sourceRoot = "${src.name}/src"; 26 | 27 | patches = ( 28 | replaceVars ./set-graphviz-path.patch { 29 | inherit graphviz; 30 | } 31 | ); 32 | 33 | nativeBuildInputs = [ 34 | wrapQtAppsHook 35 | qmake 36 | ]; 37 | 38 | buildInputs = if stdenv.hostPlatform.isDarwin then [ qtsvg ] else [ qtx11extras ]; 39 | 40 | meta = with lib; { 41 | description = "Qt Visual Graph Editor"; 42 | mainProgram = "qvgeapp"; 43 | homepage = "https://github.com/ArsMasiuk/qvge"; 44 | license = licenses.mit; 45 | maintainers = with maintainers; [ sikmir ]; 46 | platforms = platforms.unix; 47 | }; 48 | } 49 | -------------------------------------------------------------------------------- /lesser-expressions/qvge/set-graphviz-path.patch: -------------------------------------------------------------------------------- 1 | diff --git i/commonui/CNodeEditorUIController.cpp w/commonui/CNodeEditorUIController.cpp 2 | index 7dacd48..64983e4 100644 3 | --- i/qvgeui/CNodeEditorUIController.cpp 4 | +++ w/qvgeui/CNodeEditorUIController.cpp 5 | @@ -123,7 +123,7 @@ CNodeEditorUIController::CNodeEditorUIController(CMainWindow *parent) : 6 | QString pathToGraphviz = QCoreApplication::applicationDirPath() + "/../tools/graphviz"; 7 | m_optionsData.graphvizPath = QFileInfo(pathToGraphviz).absoluteFilePath(); 8 | #else 9 | - m_optionsData.graphvizPath = ""; 10 | + m_optionsData.graphvizPath = "@graphviz@/bin"; 11 | #endif 12 | m_gvController->setPathToGraphviz(m_optionsData.graphvizPath); 13 | 14 | -------------------------------------------------------------------------------- /lesser-expressions/raskin-firefox-extensions.nix: -------------------------------------------------------------------------------- 1 | 2 | let 3 | NIXPKGS_env = builtins.getEnv "NIXPKGS"; 4 | pkgsPath = if NIXPKGS_env == "" then else NIXPKGS_env; 5 | pkgs = import pkgsPath {}; in with pkgs; 6 | 7 | let customVim = import /home/raskin/src/nix/configurations/misc/raskin/custom-vim.nix; in 8 | let pp = import /home/raskin/src/nix/configurations/misc/raskin/private-packages.nix {inherit pkgs;}; in 9 | let justUse = str: {name = str; path = builtins.getAttr str pkgs;}; in 10 | let justUseMult = output: str: {name = "${str}.${output}"; path = builtins.getAttr output (builtins.getAttr str pkgs);}; in 11 | let ppUse = str: {name = str; path = builtins.getAttr str pp;}; in 12 | let julia_used = julia_15; in 13 | let myLispPackages = import ./lisp-packages.nix { inherit pkgs; }; in 14 | 15 | linkFarm "raskin-packages" ([ 16 | { name = "hide-webdriver.xpi"; path = runCommand "hide-wedriver.xpi" {} '' 17 | cd ${/home/raskin/src/js/hide-webdriver} 18 | ${zip}/bin/zip "$out" *.* 19 | '';} 20 | ]) 21 | -------------------------------------------------------------------------------- /lesser-expressions/raskin-user-communication-servers.nix: -------------------------------------------------------------------------------- 1 | let 2 | NIXPKGS_env = builtins.getEnv "NIXPKGS"; 3 | pkgsPath = if NIXPKGS_env == "" then else NIXPKGS_env; 4 | pkgs = import pkgsPath {}; 5 | allOutputNames = packages: builtins.attrNames 6 | (pkgs.lib.fold 7 | (a: b: b // 8 | (builtins.listToAttrs (map (x: {name = x; value = x;}) a.outputs or ["out"]))) 9 | {} packages); 10 | fullEnv = name: packages: 11 | pkgs.buildEnv { 12 | name = name; 13 | paths = packages; 14 | ignoreCollisions = false; 15 | checkCollisionContents = true; 16 | pathsToLink = ["/"]; 17 | extraOutputsToInstall = (allOutputNames packages); 18 | }; 19 | in with pkgs; 20 | 21 | linkFarm "raskin-heavy-packages" ([ 22 | { name = "main-heavy-package-set"; 23 | path = (fullEnv "main-heavy-package-set" 24 | [ 25 | prosody matrix-synapse dovecot postfix 26 | bind kea dnsmasq lighttpd nginx 27 | ]);} 28 | ]) 29 | -------------------------------------------------------------------------------- /lesser-expressions/raskin-user-lisps.nix: -------------------------------------------------------------------------------- 1 | let 2 | NIXPKGS_env = builtins.getEnv "NIXPKGS"; 3 | pkgsPath = if NIXPKGS_env == "" then else NIXPKGS_env; 4 | pkgs = import pkgsPath {}; in with pkgs; 5 | 6 | let pp = import /home/raskin/src/nix/configurations/misc/raskin/private-packages.nix {inherit pkgs;}; in 7 | let justUse = str: {name = str; path = builtins.getAttr str pkgs;}; in 8 | let justUseMult = output: str: {name = "${str}.${output}"; path = builtins.getAttr output (builtins.getAttr str pkgs);}; in 9 | let ppUse = str: {name = str; path = builtins.getAttr str pp;}; in 10 | 11 | linkFarm "raskin-packages" ( 12 | (map justUse [ 13 | "sbcl" 14 | "ccl" "ecl" "clisp" /*"gcl"*/ "abcl" "mkcl" 15 | "asdf" 16 | "racket" 17 | ]) 18 | ) 19 | -------------------------------------------------------------------------------- /lesser-expressions/raskin-user-nixos-gc-pin.nix: -------------------------------------------------------------------------------- 1 | let 2 | NIXPKGS_env = builtins.getEnv "NIXPKGS"; 3 | pkgsPath = if NIXPKGS_env == "" then else NIXPKGS_env; 4 | pkgs = import pkgsPath {}; 5 | 6 | in with pkgs; 7 | 8 | linkFarm "raskin-packages" ([ 9 | { name = "nixpkgs-manual"; path = import {}; } 10 | { name = "nixos-empty-container"; path = (import { 11 | configuration = { 12 | boot.isContainer = true; 13 | documentation.dev.enable = true; 14 | documentation.nixos.enable = true; 15 | system.stateVersion = "99.99"; 16 | }; 17 | }).system; } 18 | { name = "nixos-empty-vm"; path = (import { 19 | configuration = { 20 | documentation.dev.enable = true; 21 | documentation.nixos.enable = true; 22 | system.stateVersion = "99.99"; 23 | }; 24 | }).vm; } 25 | { name = "python-black"; path = pkgs.python3Packages.black; } 26 | { name = "nixos-test"; path = (import {}).tests.login.x86_64-linux; } 27 | ]) 28 | -------------------------------------------------------------------------------- /lesser-expressions/raskin-user-priority.nix: -------------------------------------------------------------------------------- 1 | let 2 | NIXPKGS_env = builtins.getEnv "NIXPKGS"; 3 | pkgsPath = if NIXPKGS_env == "" then else NIXPKGS_env; 4 | pkgs = import pkgsPath { 5 | config = { 6 | allowInsecurePredicate = x: ( 7 | false 8 | ); 9 | }; 10 | }; 11 | allOutputNames = packages: builtins.attrNames 12 | (pkgs.lib.fold 13 | (a: b: b // 14 | (builtins.listToAttrs (map (x: {name = x; value = x;}) a.outputs or ["out"]))) 15 | {} packages); 16 | fullEnv = name: packages: 17 | pkgs.buildEnv { 18 | name = name; 19 | paths = packages; 20 | ignoreCollisions = false; 21 | checkCollisionContents = true; 22 | pathsToLink = ["/"]; 23 | extraOutputsToInstall = (allOutputNames packages); 24 | }; 25 | in with pkgs; 26 | 27 | fullEnv "main-light-package-set" 28 | [ 29 | vimHugeX 30 | ] 31 | -------------------------------------------------------------------------------- /lesser-expressions/raskin-user-ultraheavy.nix: -------------------------------------------------------------------------------- 1 | let 2 | NIXPKGS_env = builtins.getEnv "NIXPKGS"; 3 | pkgsPath = if NIXPKGS_env == "" then else NIXPKGS_env; 4 | pkgs = import pkgsPath {}; 5 | allOutputNames = packages: builtins.attrNames 6 | (pkgs.lib.fold 7 | (a: b: b // 8 | (builtins.listToAttrs (map (x: {name = x; value = x;}) a.outputs or ["out"]))) 9 | {} packages); 10 | fullEnv = name: packages: 11 | pkgs.buildEnv { 12 | name = name; 13 | paths = packages; 14 | ignoreCollisions = false; 15 | checkCollisionContents = true; 16 | pathsToLink = ["/"]; 17 | extraOutputsToInstall = (allOutputNames packages); 18 | }; 19 | in with pkgs; 20 | 21 | linkFarm "raskin-ultraheavy-packages" ([ 22 | { name = "main-ultraheavy-package-set"; 23 | path = (fullEnv "main-ultraheavy-package-set" 24 | [ 25 | /* libreoffice */ /*chromium*/ /* qutebrowser */ winePackages.unstable 26 | /*sage*/ /*midori*/ /* scilab-bin */ /* clasp-common-lisp */ 27 | /* eolie */ 28 | epiphany 29 | ffmpeg-full obs-studio audacity /* pitivi */ 30 | ]);} 31 | ]) 32 | 33 | -------------------------------------------------------------------------------- /lesser-expressions/raskin-user-unfree.nix: -------------------------------------------------------------------------------- 1 | let 2 | NIXPKGS_env = builtins.getEnv "NIXPKGS"; 3 | pkgsPath = if NIXPKGS_env == "" then else NIXPKGS_env; 4 | pkgs = import pkgsPath {}; in with pkgs; 5 | 6 | let customVim = import /home/raskin/src/nix/configurations/misc/raskin/custom-vim.nix; in 7 | let pp = import /home/raskin/src/nix/configurations/misc/raskin/private-packages.nix {inherit pkgs;}; in 8 | let justUse = str: {name = str; path = builtins.getAttr str pkgs;}; in 9 | let ppUse = str: {name = str; path = builtins.getAttr str pp;}; in 10 | 11 | linkFarm "raskin-packages" ([ 12 | { name = "flashplayer-standalone" ; path = callPackage ./flashplayer.nix {};} 13 | ] 14 | ++ 15 | (map justUse [ 16 | "tptp" 17 | "vampire" 18 | ]) 19 | ) 20 | -------------------------------------------------------------------------------- /lesser-expressions/stable-diffusion-cpp.nix: -------------------------------------------------------------------------------- 1 | { stdenv, fetchgit, cmake, git, vulkan-headers, vulkan-loader, shaderc }: 2 | stdenv.mkDerivation (finalAttrs: { 3 | pname = "stable-diffusion-cpp"; 4 | version = "0.0-unnamed-2025-03-09-master-d7c7a34"; 5 | 6 | src = fetchgit { 7 | url = "https://github.com/leejet/stable-diffusion.cpp"; 8 | tag = "master-d7c7a34"; 9 | hash = "sha256-xFrpdVJOE5Yhvwh+ZWp0Z5QQLNahQ2e47J7K6yZPkUo="; 10 | fetchSubmodules = true; 11 | }; 12 | 13 | nativeBuildInputs = [ cmake git shaderc ]; 14 | cmakeFlags = [ "-DSD_VULKAN=ON" ]; 15 | 16 | buildInputs = [ vulkan-headers vulkan-loader ]; 17 | }) 18 | -------------------------------------------------------------------------------- /lesser-expressions/test-texlive.nix: -------------------------------------------------------------------------------- 1 | let 2 | pkgs=import {}; 3 | texLivePaths = with pkgs; [ 4 | texLive texLiveExtra lmodern texLiveCMSuper 5 | texLiveLatexXColor texLivePGF 6 | texLiveBeamer texLiveModerncv tipa texLiveContext 7 | texDisser lmmath 8 | ]; 9 | myTexLive = pkgs.texLiveAggregationFun { 10 | paths = texLivePaths; 11 | }; 12 | in 13 | with pkgs; myEnvFun { 14 | buildInputs=[myTexLive bash coreutils strace xpdf fontconfig asymptote 15 | ghostscript]; 16 | name="texlive-test"; 17 | } 18 | -------------------------------------------------------------------------------- /lesser-expressions/tptp4X.nix: -------------------------------------------------------------------------------- 1 | { stdenv, fetchFromGitHub, curl }: 2 | stdenv.mkDerivation (finalAttrs: { 3 | pname = "tptp4X"; 4 | version = "0.0-untagged-20250226"; 5 | src = fetchFromGitHub { 6 | owner = "TPTPWorld"; 7 | repo = "TPTP4X"; 8 | rev = "914d3fd62fe7d6c0c2fe6416b10f5f5e1ede853f"; 9 | hash = "sha256-NfORXfeX1aTcuYkKgXI1aZB7DYwFzPo/wwCG4mIgDw8="; 10 | }; 11 | jjparser = fetchFromGitHub { 12 | owner = "TPTPWorld"; 13 | repo = "JJParser"; 14 | rev = "75ebf8b149728c4794ba81308709b6ee16f1e31"; 15 | hash = "sha256-rJYwueDGWkC9qfSPHg2SH7ed6z1OVP1lM3sMa7xGMy0="; 16 | }; 17 | prePatch = '' 18 | chmod u+rwX -R . 19 | rmdir JJParser 20 | cp -r ${finalAttrs.jjparser} JJParser 21 | chmod u+rwX -R . 22 | sed -re 's/return[(]"sumo"[)];/& break; case smt2: return("smt2"); /' -i JJParser/PrintTSTP.c 23 | cat JJParser/PrintTSTP.c 24 | ''; 25 | buildInputs = [ curl ]; 26 | installPhase = '' 27 | mkdir -p "$out"/bin 28 | cp tptp4X "$out/bin" 29 | ''; 30 | }) 31 | -------------------------------------------------------------------------------- /live-dvd.nix: -------------------------------------------------------------------------------- 1 | { nixpkgs ? ../../../nixpkgs }: 2 | let system = builtins.currentSystem; in 3 | with import nixpkgs {inherit system;}; 4 | let 5 | config = (import ../../../nixos/lib/eval-config.nix { 6 | inherit system nixpkgs; 7 | modules = [ ./live-dvd-module.nix ]; 8 | }).config; 9 | in config.system.build.isoImage 10 | -------------------------------------------------------------------------------- /matlab-fhs-env.nix: -------------------------------------------------------------------------------- 1 | with import {}; 2 | buildFHSUserEnv 3 | { 4 | name = "matlab-env"; 5 | targetPkgs = p: 6 | (with p; 7 | [ 8 | mesa.osmesa aspell portaudio pixman harfbuzz libxml2 qt5. 9 | qtbase libffi udev coreutils alsaLib dpkg gcc48 freetype glib fontconfig 10 | openssl which ncurses jdk11 pam dbus_glib dbus pango gtk2-x11 11 | atk gdk_pixbuf cairo ncurses5 mesa_glu zlib libglvnd 12 | ]) 13 | ++ 14 | (with p.xorg; 15 | [ 16 | libX11 17 | libXcursor 18 | libXrandr 19 | libXext 20 | libSM 21 | libICE 22 | libX11 23 | libXrandr 24 | libXdamage 25 | libXrender 26 | libXfixes 27 | libXcomposite 28 | libXcursor 29 | libxcb 30 | libXi 31 | libXScrnSaver 32 | libXtst 33 | libXt 34 | libXxf86vm 35 | libXpm 36 | libXp 37 | libXmu 38 | ]); 39 | } 40 | -------------------------------------------------------------------------------- /minimal-container-nixos.nix: -------------------------------------------------------------------------------- 1 | { boot.isContainer = true; } 2 | -------------------------------------------------------------------------------- /nix-build-machines.nix: -------------------------------------------------------------------------------- 1 | { 2 | gb-bxi7-4770r-1 = { 3 | hostName = "192.168.0.202"; 4 | sshUser = "nix"; 5 | sshKey = "/nix/var/nix/keys/id_nix_remote"; 6 | system = "x86_64-linux"; 7 | maxJobs = 6; 8 | supportedFeatures = ["kvm" ]; 9 | speedFactor = "2"; 10 | }; 11 | gb-bxi7-4770r-1-i686 = { 12 | hostName = "192.168.0.202"; 13 | sshUser = "nix"; 14 | sshKey = "/nix/var/nix/keys/id_nix_remote"; 15 | system = "i686-linux"; 16 | maxJobs = 6; 17 | supportedFeatures = ["kvm" ]; 18 | speedFactor = "2"; 19 | }; 20 | } 21 | -------------------------------------------------------------------------------- /nvidia-test.nix: -------------------------------------------------------------------------------- 1 | { 2 | pkgs, config, ... 3 | }: 4 | { 5 | services.xserver.enable = true; 6 | services.xserver.videoDrivers = ["nvidia"]; 7 | nixpkgs.config.allowUnfree = true; 8 | 9 | boot = { 10 | loader.grub = { 11 | enable = true; 12 | version = 2; 13 | efiSupport = true; 14 | device = "nodev"; 15 | copyKernels = true; 16 | }; 17 | }; 18 | 19 | fileSystems = [ 20 | { 21 | mountPoint = "/"; 22 | label = "NixOSRescue"; 23 | fsType = "ext4"; 24 | } 25 | { 26 | mountPoint = "/boot/"; 27 | label = "RESCUE_EFI"; 28 | fsType = "vfat"; 29 | } 30 | ]; 31 | } 32 | -------------------------------------------------------------------------------- /postgresql.nix: -------------------------------------------------------------------------------- 1 | {pkgs, ...}: 2 | { 3 | enableTCPIP = true; 4 | enable = true; 5 | authentication = '' 6 | host all all 192.168.0.0/16 md5 7 | ''; 8 | extraConfig = '' 9 | work_mem = 16MB 10 | shared_buffers = 1GB 11 | ''; 12 | package = pkgs.postgresql92; 13 | } 14 | -------------------------------------------------------------------------------- /private-packages/node-purple/node-purple/default.nix: -------------------------------------------------------------------------------- 1 | # This file has been generated by node2nix 1.6.0. Do not edit! 2 | 3 | {pkgs ? import { 4 | inherit system; 5 | }, system ? builtins.currentSystem, nodejs ? pkgs."nodejs-6_x"}: 6 | 7 | let 8 | nodeEnv = import ./node-env.nix { 9 | inherit (pkgs) stdenv python2 utillinux runCommand writeTextFile; 10 | inherit nodejs; 11 | libtool = if pkgs.stdenv.isDarwin then pkgs.darwin.cctools else null; 12 | }; 13 | in 14 | import ./node-packages.nix { 15 | inherit (pkgs) fetchurl fetchgit; 16 | inherit nodeEnv; 17 | } -------------------------------------------------------------------------------- /private-packages/node-purple/node-purple/override.nix: -------------------------------------------------------------------------------- 1 | {pkgs ? import { 2 | inherit system; 3 | }, system ? builtins.currentSystem, nodejs ? pkgs."nodejs-6_x"}: 4 | 5 | let super = import ./default.nix { inherit pkgs system nodejs; }; 6 | args = { 7 | src = pkgs.fetchFromGitHub { 8 | owner = "matrix-org"; 9 | repo = "node-purple"; 10 | rev = "f5ad4ef7989046bb1c1e963a0a7510737d527eef"; 11 | sha256 = "182hlh130ap5vjbkf1a67dj022d3254j4gqxq2lv5jl3spqicfqd"; 12 | }; 13 | postInstall = '' 14 | sed -e '/var LIBRARY_PATHS/aLIBRARY_PATHS.push("${pkgs.lib.getLib pkgs.pidgin}/lib/libpurple.so");' -i "$out"/lib/node*/*/purple.js 15 | ''; 16 | }; 17 | in 18 | { 19 | package = super.package.override args; 20 | shell = super.shell.override args; 21 | } 22 | -------------------------------------------------------------------------------- /raskin-config.nix: -------------------------------------------------------------------------------- 1 | {pkgs,...}: 2 | { 3 | fetchmtn = { 4 | cacheDB = "/var/cache/monotone/mtn.db"; 5 | # defaultDBMirrors = ["file:///home/raskin/.mtn-journal-dir/.mtn.db"]; 6 | }; 7 | 8 | ikiwiki = { 9 | git = true; 10 | monotone = true; 11 | }; 12 | 13 | packageOverrides = p: 14 | let 15 | pp = import ./private-packages.nix {pkgs=p;}; 16 | in 17 | { 18 | glibcLocales = p.glibcLocales.override { 19 | locales = ["en_US.UTF-8/UTF-8" "ru_RU.UTF-8/UTF-8" "ru_RU.KOI8-R/KOI8-R" "ru_RU.CP1251/CP1251"]; 20 | allLocales = true; 21 | }; 22 | #patchelf06 = p.lib.overrideDerivation p.patchelf06 (x: { 23 | # src = "" + /home/repos/patchelf + ""; 24 | # preConfigure = "./bootstrap.sh"; 25 | # buildInputs = x.buildInputs ++ [p.autoconf p.automake p.libtool]; 26 | #}); 27 | # grub2 = pp.grub2Bzr; 28 | # kexectools="/var/empty/"; 29 | }; 30 | 31 | allowUnfreePredicate = (x: 32 | (pkgs.lib.hasPrefix "nvidia-x11-" x.name) || 33 | false 34 | ); 35 | 36 | allowTexliveBuilds = true; 37 | } 38 | -------------------------------------------------------------------------------- /setuid-programs.nix: -------------------------------------------------------------------------------- 1 | { 2 | plainSetuidPrograms = [ 3 | "fusermount" 4 | "mount" "umount" "sudo" "xlaunch" 5 | "lsof" "suid-chroot" "fbterm" "pmount" 6 | "pumount" "udisks" "su" "passwd" 7 | "lxc-execute" "init.lxc" "firejail" 8 | ]; 9 | renamedSetuidPrograms = [ 10 | {src="unix_chkpwd.orig";dst="unix_chkpwd";} 11 | ]; 12 | } 13 | -------------------------------------------------------------------------------- /system-setup.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/7c6f434c/7c6f434c-configurations/3109e53904f3c22cdb1a0347b457d02c2d5193af/system-setup.sh -------------------------------------------------------------------------------- /texlive-set.nix: -------------------------------------------------------------------------------- 1 | pkgs: 2 | /* 3 | let 4 | texLivePaths = with pkgs; [ 5 | texLive texLiveExtra lmodern texLiveCMSuper 6 | texLiveLatexXColor texLivePGF 7 | texLiveBeamer texLiveModerncv tipa texLiveContext 8 | texDisser lmmath texinfo5 tex4ht texLiveModerntimeline 9 | ]; 10 | myTexLive = pkgs.texLiveAggregationFun { 11 | paths = texLivePaths; 12 | }; 13 | in 14 | myTexLive 15 | */ 16 | 17 | pkgs.texlive.combine { 18 | inherit(pkgs.texlive) 19 | scheme-medium collection-langcyrillic 20 | cm-super cm-unicode xcolor pgf beamer moderncv tipa disser urlbst 21 | moderntimeline texinfo metafont multibib collection-fontutils 22 | epstopdf epspdfconversion epspdf algorithm2e relsize type1cm logreq 23 | ucs todonotes xargs forloop pbox varwidth bigfoot environ trimspaces 24 | forest arydshln pgfopts elocalloc libertine mweights fontaxes 25 | totpages comment soul multirow threeparttable lastpage preprint 26 | mnsymbol paralist animate media9 ocgx2 breakcites biblatex bibtex 27 | xstring wrapfig ifoddpage inlinedef 28 | ; 29 | } 30 | -------------------------------------------------------------------------------- /tools-for-cosmo/toolset.nix: -------------------------------------------------------------------------------- 1 | let pkgs = import {}; in 2 | with pkgs; 3 | with rec { 4 | toolset = pkgs.buildEnv { 5 | name = "tools"; 6 | paths = [ 7 | nix 8 | monotone 9 | file remind 10 | pv wavemon nmap 11 | gcc11 m4 rsync gnumake 12 | age fzf 13 | graphviz 14 | (import ../lesser-expressions/texlive-set.nix pkgs) 15 | (runCommandCC "in-pty" {} '' 16 | mkdir -p "$out/bin" 17 | cc -lutil ${../lang-os/c/in-pty.c} -o "$out/bin/in-pty" 18 | '') 19 | ]; 20 | }; 21 | }; 22 | toolset 23 | -------------------------------------------------------------------------------- /tools-for-vps/dehydrated.conf: -------------------------------------------------------------------------------- 1 | BASEDIR="/var/dehydrated" 2 | CONFIG_D="${BASEDIR}/conf.d" 3 | WELLKNOWN="${BASEDIR}/acme-challenge" 4 | DOMAINS_TXT="${BASEDIR}/domains.txt.private" 5 | PRIVATE_KEY_RENEW="no" 6 | HOOK=/etc/dehydrated/dehydrated-hook.sh 7 | -------------------------------------------------------------------------------- /tools-for-vps/dehydrated.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Dehydrated Let's Encrypt client 3 | 4 | [Service] 5 | Type=oneshot 6 | User=root 7 | ExecStartPre=/root/tools/bin/dehydrated -f /var/dehydrated/dehydrated.conf --register --accept-terms 8 | ExecStart=/root/tools/bin/dehydrated -c -f /var/dehydrated/dehydrated.conf 9 | 10 | [Install] 11 | WantedBy=dehydrated.timer 12 | -------------------------------------------------------------------------------- /tools-for-vps/dehydrated.timer: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Run dehydrated daily 3 | 4 | [Timer] 5 | OnCalendar=*-*-* 04:00:00 6 | Persistent = True 7 | 8 | [Install] 9 | WantedBy=multi-user.target 10 | -------------------------------------------------------------------------------- /tools-for-vps/dovecot.conf: -------------------------------------------------------------------------------- 1 | mail_location = mbox:~/mail:INBOX=/var/mail/%u 2 | protocols = imap pop3 3 | auth_mechanisms = plain login 4 | mail_privileged_group = mail 5 | passdb { 6 | driver = shadow 7 | } 8 | userdb { 9 | driver = passwd 10 | args = blocking=no 11 | } 12 | service auth-worker { 13 | group = shadow 14 | } 15 | service auth { 16 | unix_listener /var/lib/postfix/private/auth { 17 | mode = 0660 18 | # Assuming the default Postfix user and group 19 | user = postfix 20 | group = postfix 21 | } 22 | } 23 | 24 | ssl=yes 25 | ssl_key = /dev/null 10 | } 11 | 12 | while true; do 13 | while check_running; do 14 | sleep 1; 15 | done; 16 | rm ~/mnt/irc/"$IRC_SERVER"/in 17 | ii -s "$IRC_SERVER" -i ~/mnt/irc/ -n IdleBot_$( 18 | dd if=/dev/urandom bs=1 count=4 | xxd -ps ) & 19 | while ! test -e ~/mnt/irc/"$IRC_SERVER"/in; do 20 | sleep 1; 21 | check_running || exit 1 22 | done 23 | for c in $CHANNELS; do 24 | echo /j "#$c" > ~/mnt/irc/"$IRC_SERVER"/in; 25 | sleep 1; 26 | done; 27 | done 28 | -------------------------------------------------------------------------------- /tools-for-vps/ii-starter-libera-chat: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | export HOME=/home/raskin 4 | export PATH="$PATH:$HOME/tools/bin/" 5 | export IRC_SERVER=irc.libera.chat 6 | export CHANNELS='nixos-security stumpwm irp tunes bussard ca-duel cl-fuse query-fs nixos-de spectrum' 7 | 8 | check_running(){ 9 | ps -ef | grep -v grep | grep " ii -s $IRC_SERVER " > /dev/null 10 | } 11 | 12 | while true; do 13 | while check_running; do 14 | sleep 1; 15 | done; 16 | rm ~/mnt/irc/"$IRC_SERVER"/in 17 | ii -s "$IRC_SERVER" -i ~/mnt/irc/ -n IdleBot_$( 18 | dd if=/dev/urandom bs=1 count=4 | xxd -ps ) & 19 | while ! test -e ~/mnt/irc/"$IRC_SERVER"/in; do 20 | sleep 1; 21 | check_running || exit 1 22 | done 23 | for c in $CHANNELS; do 24 | echo /j "#$c" > ~/mnt/irc/"$IRC_SERVER"/in; 25 | sleep 1; 26 | done; 27 | done 28 | -------------------------------------------------------------------------------- /tools-for-vps/ii-starter-oftc: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | export HOME=/home/raskin 4 | export PATH="$PATH:$HOME/tools/bin/" 5 | export IRC_SERVER=irc.oftc.net 6 | export CHANNELS='spectrum' 7 | 8 | check_running(){ 9 | ps -ef | grep -v grep | grep " ii -s $IRC_SERVER " > /dev/null 10 | } 11 | 12 | while true; do 13 | while check_running; do 14 | sleep 1; 15 | done; 16 | rm ~/mnt/irc/"$IRC_SERVER"/in 17 | ii -s "$IRC_SERVER" -i ~/mnt/irc/ -n IdleBot_$( 18 | dd if=/dev/urandom bs=1 count=4 | xxd -ps ) & 19 | while ! test -e ~/mnt/irc/"$IRC_SERVER"/in; do 20 | sleep 1; 21 | check_running || exit 1 22 | done 23 | for c in $CHANNELS; do 24 | echo /j "#$c" > ~/mnt/irc/"$IRC_SERVER"/in; 25 | sleep 1; 26 | done; 27 | done 28 | -------------------------------------------------------------------------------- /tools-for-vps/ii-summarise: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | export PATH="$PATH:$HOME/tools/bin/" 4 | export LOCALE_ARCHIVE="$HOME/tools/lib/locale/locale-archive" 5 | 6 | cutoffdate="$1" 7 | ts="$(date --date="$cutoffdate" +%s)" 8 | 9 | tsre="$ts" 10 | 11 | l="${#ts}" 12 | 13 | while test "$l" -gt 1; do 14 | l=$((l-1)) 15 | last="${ts:l:1}" 16 | lastp=$((last+1)) 17 | prefix="${ts:0:l}" 18 | test "$last" -lt 9 && tsre="$tsre|($prefix[$lastp-9][0-9]*)" 19 | done 20 | 21 | cutoff="$cutyear-$cutmonth-(${cutday:0:1}[${cutday:1:1}-9]|[$((${cutday:0:1} + 1))-9].)" 22 | 23 | trap "reset; exit" 3 24 | 25 | cd ~/mnt/irc 26 | 27 | while ( grep -A999999 -E "^($tsre) " */*/out | sed -re 's@^([-/a-z.0-9#]*/out:[0-9]{6})[0-9]{4} -!- .*@\10000@' | uniq | less -c ); do :; done; 28 | -------------------------------------------------------------------------------- /tools-for-vps/ii.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=ii IRC watcher 3 | 4 | [Service] 5 | User=raskin 6 | ExecStart=/home/raskin/ii-starter 7 | 8 | [Install] 9 | WantedBy=multi-user.target 10 | -------------------------------------------------------------------------------- /tools-for-vps/nat: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | iptables -t nat -A POSTROUTING -o "$IFACE" -j MASQUERADE 4 | echo 1 > /proc/sys/net/ipv4/ip_forward 5 | -------------------------------------------------------------------------------- /tools-for-vps/nginx.conf: -------------------------------------------------------------------------------- 1 | error_log /var/nginx/logs/www_err; 2 | user www-data; 3 | pid /run/nginx.pid; 4 | http { 5 | access_log /var/nginx/logs/www_log; 6 | error_log /var/nginx/logs/www_err; 7 | 8 | include /root/tools/conf/mime.types; 9 | default_type application/octet-stream; 10 | 11 | server { 12 | listen 80; 13 | location / { 14 | root /var/www/; 15 | autoindex on; 16 | charset "utf-8"; 17 | add_header "Client-IP" $remote_addr; 18 | } 19 | 20 | 21 | } 22 | 23 | include /var/nginx/conf/nginx.ssl.conf; 24 | 25 | } 26 | 27 | worker_processes 2; 28 | events { 29 | worker_connections 128; 30 | } 31 | 32 | -------------------------------------------------------------------------------- /tools-for-vps/nginx.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Nginx HTTP server 3 | 4 | [Service] 5 | Type=forking 6 | PIDFile=/run/nginx.pid 7 | User=root 8 | ExecStartPre=/root/tools/bin/nginx -t -q -p /var/nginx -g 'daemon on; master_process on;' 9 | ExecStart=/root/tools/bin/nginx -p /var/nginx -g 'daemon on; master_process on;' 10 | ExecStop= 11 | 12 | [Install] 13 | WantedBy=multi-user.target 14 | 15 | -------------------------------------------------------------------------------- /tools-for-vps/opendkim.conf: -------------------------------------------------------------------------------- 1 | # This is a simple config file for signing and verifying 2 | 3 | Mode sv 4 | LogWhy yes 5 | Syslog yes 6 | SyslogSuccess yes 7 | 8 | Canonicalization relaxed/simple 9 | 10 | Domain @@@ 11 | Selector default 12 | KeyFile /var/db/dkim/default.private 13 | 14 | Socket inet:8891@localhost 15 | 16 | ReportAddress postmaster@michaelraskin.top 17 | SendReports no 18 | 19 | RequireSafeKeys no 20 | 21 | ## Hosts to sign email for - 127.0.0.1 is default 22 | ## See the OPERATION section of opendkim(8) for more information 23 | # 24 | # InternalHosts 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12 25 | 26 | ## For secondary mailservers - indicates not to sign or verify messages 27 | ## from these hosts 28 | # 29 | # PeerList X.X.X.X 30 | 31 | # PidFile /var/run/opendkim/opendkim.pid 32 | 33 | UserID opendkim:opendkim 34 | -------------------------------------------------------------------------------- /tools-for-vps/opendkim.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=OpenDKIM mail signer 3 | 4 | [Service] 5 | ExecStart=/root/tools/bin/opendkim -f -x /etc/opendkim.conf 6 | 7 | [Install] 8 | WantedBy=multi-user.target 9 | 10 | -------------------------------------------------------------------------------- /tools-for-vps/openvpn-tcp.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=OpenVPN server (UDP) 3 | 4 | [Service] 5 | ExecStart=/root/tools/bin/openvpn /etc/openvpn/server-tcp.conf 6 | WorkingDirectory=/etc/openvpn/ 7 | 8 | [Install] 9 | WantedBy=multi-user.target 10 | -------------------------------------------------------------------------------- /tools-for-vps/openvpn.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=OpenVPN server (UDP) 3 | 4 | [Service] 5 | ExecStart=/root/tools/bin/openvpn /etc/openvpn/server.conf 6 | WorkingDirectory=/etc/openvpn/ 7 | 8 | [Install] 9 | WantedBy=multi-user.target 10 | -------------------------------------------------------------------------------- /tools-for-vps/pam/auth: -------------------------------------------------------------------------------- 1 | # Account management. 2 | account required pam_unix.so 3 | # Authentication management. 4 | auth sufficient pam_unix.so nullok likeauth try_first_pass 5 | auth required pam_deny.so 6 | # Password management. 7 | password sufficient pam_unix.so nullok sha512 8 | # Session management. 9 | session required pam_env.so conffile=/dev/null readenv=0 10 | session required pam_unix.so 11 | session required pam_loginuid.so 12 | session required @pam@/lib/security/pam_lastlog.so silent 13 | -------------------------------------------------------------------------------- /tools-for-vps/pam/dovecot: -------------------------------------------------------------------------------- 1 | # Account management. 2 | account required pam_unix.so 3 | # Authentication management. 4 | auth sufficient pam_unix.so nullok likeauth try_first_pass 5 | auth required pam_deny.so 6 | # Password management. 7 | password sufficient pam_unix.so nullok sha512 8 | # Session management. 9 | session required pam_env.so conffile=/dev/null readenv=0 10 | session required pam_unix.so 11 | session required pam_loginuid.so 12 | session required @pam@/lib/security/pam_lastlog.so silent 13 | -------------------------------------------------------------------------------- /tools-for-vps/postfix-key-concat.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Key concatenation for Postfix 3 | 4 | [Service] 5 | Type=oneshot 6 | User=root 7 | ExecStart=bash -c 'for i in /var/dehydrated/certs/*/; do cd $i; cat privkey.pem fullchain.pem > key-chain-concatenated.pem; done' 8 | 9 | [Install] 10 | WantedBy=postfix-key-concat.timer 11 | 12 | -------------------------------------------------------------------------------- /tools-for-vps/postfix-key-concat.timer: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Run key concatenation daily 3 | 4 | [Timer] 5 | OnCalendar=*-*-* 04:30:00 6 | Persistent = True 7 | 8 | [Install] 9 | WantedBy=multi-user.target 10 | 11 | -------------------------------------------------------------------------------- /tools-for-vps/postfix.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Postfix mail server 3 | 4 | [Service] 5 | Type=forking 6 | ExecStart=/root/tools/bin/postfix -c /etc/postfix start 7 | 8 | [Install] 9 | WantedBy=multi-user.target 10 | -------------------------------------------------------------------------------- /tools-for-vps/postfix/main.cf: -------------------------------------------------------------------------------- 1 | mydestination = @@@ 2 | mydomain = @@domain@@ 3 | mynetworks = 127.0.0.1/32 4 | smtpd_relay_restrictions = permit_sasl_authenticated, reject_unauth_destination 5 | 6 | smtpd_sasl_auth_enable = yes 7 | smtpd_sasl_type = dovecot 8 | smtpd_sasl_path = /var/lib/postfix/private/auth 9 | smtpd_sasl_security_options = noanonymous 10 | smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination 11 | 12 | smtpd_tls_security_level = may 13 | smtpd_tls_chain_files = 14 | /var/dehydrated/certs/michaelraskin.top/privkey.pem, 15 | /var/dehydrated/certs/michaelraskin.top/fullchain.pem 16 | 17 | tls_server_sni_maps = hash:/etc/postfix/sni 18 | 19 | always_add_missing_headers = no 20 | 21 | recipient_delimiter = + 22 | 23 | smtpd_milters = inet:127.0.0.1:8891 24 | non_smtpd_milters = $smtpd_milters 25 | milter_default_action = accept 26 | 27 | smtp_tls_security_level = may 28 | 29 | compatibility_level = 3.9 30 | 31 | message_size_limit = 10240000 32 | mailbox_size_limit = 204800000 33 | -------------------------------------------------------------------------------- /tools-for-vps/postfix/sni: -------------------------------------------------------------------------------- 1 | @@@ /var/dehydrated/certs/@@@/key-chain-concatenated.pem 2 | -------------------------------------------------------------------------------- /tools-for-vps/private-settings-list.txt: -------------------------------------------------------------------------------- 1 | domains.txt.private 2 | dovecot.private 3 | openvpn-keys.private 4 | openvpn.private 5 | postfix.private 6 | target.private 7 | shadowsocks.private/ 8 | target-domain.txt.private 9 | -------------------------------------------------------------------------------- /tools-for-vps/push-tools.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | test -n "$1" || { 4 | "$0" $(cat target.private) 5 | exit 6 | } 7 | 8 | nix-instantiate ./vps-side.nix --add-root ~/.nix-personal/derivations/vps-tools.drv 9 | nix-store -r ~/.nix-personal/derivations/vps-tools.drv --add-root ~/.nix-personal/vps-tools 10 | toolset="$(readlink -f ~/.nix-personal/vps-tools)" 11 | nix copy "$toolset" -s --to ssh://root@"$1" 12 | 13 | ssh root@"$1" ln -sfT "$toolset" ./tools 14 | ssh root@"$1" ./tools/bin/nix-store --indirect --add-root ./tools -r "$toolset" 15 | ssh root@"$1" ln -sfT "$toolset" /opt/tools 16 | ssh root@"$1" ./tools/bin/remote-deploy 17 | ssh raskin@"$1" ln -sfT "$toolset" ./tools 18 | ssh matrix@"$1" ln -sfT "$toolset" ./tools 19 | scp openvpn-keys.private/pki/ca.crt openvpn-keys.private/pki/private/server.key openvpn-keys.private/pki/issued/server.crt openvpn-keys.private/2048.dhparam "root@$1:/etc/openvpn/" 20 | -------------------------------------------------------------------------------- /tools-for-vps/scite.nix: -------------------------------------------------------------------------------- 1 | { lib, stdenv, fetchurl, pkgconfig, gtk3 }: 2 | 3 | stdenv.mkDerivation { 4 | pname = "scite"; 5 | version = "4.4.6"; 6 | 7 | src = fetchurl { 8 | url = "https://www.scintilla.org/scite446.tgz"; 9 | sha256 = "sha256:1l8nbpjvkz5d6a4yr8r4ccvnrl4p3i5klwfrhclyb8ladkp6wbhw"; 10 | }; 11 | 12 | nativeBuildInputs = [ pkgconfig ]; 13 | buildInputs = [ gtk3 ]; 14 | sourceRoot = "scintilla/gtk"; 15 | 16 | buildPhase = '' 17 | make GTK3=1 18 | cd ../../scite/gtk 19 | make prefix=$out/ GTK3=1 20 | ''; 21 | 22 | installPhase = '' 23 | make install prefix=$out/ 24 | ''; 25 | 26 | meta = with lib; { 27 | homepage = "https://www.scintilla.org/SciTE.html"; 28 | description = "SCIntilla based Text Editor"; 29 | license = licenses.mit; 30 | platforms = platforms.linux; 31 | maintainers = [ maintainers.rszibele ]; 32 | }; 33 | } 34 | -------------------------------------------------------------------------------- /tools-for-vps/screenrc: -------------------------------------------------------------------------------- 1 | startup_message off 2 | hardstatus off 3 | hardstatus alwaysignore 4 | scrollback 100000 5 | defscrollback 100000 6 | -------------------------------------------------------------------------------- /tools-for-vps/shadowsocks.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Shadowsocks proxy server 3 | 4 | [Service] 5 | Type=exec 6 | ExecStart=/root/tools/bin/ssserver --server-addr @@@addr@@@:48080 --encrypt-method chacha20-ietf-poly1305 --password @@@password@@@ 7 | 8 | [Install] 9 | WantedBy=multi-user.target 10 | 11 | 12 | -------------------------------------------------------------------------------- /xserver-intel.nix: -------------------------------------------------------------------------------- 1 | {pkgs,...}: 2 | { 3 | enable = true; 4 | 5 | # Do not run on startup 6 | autorun = false; 7 | 8 | # Create /etc/X11/xorg.conf for convenience 9 | exportConfiguration = true; 10 | 11 | # Needed by, say, xmove 12 | enableTCP = true; 13 | 14 | virtualScreen = {x=3520; y=2200;}; 15 | 16 | # I get Caps-toggle between Latin/Cyrillic/Greek 17 | # Right Flag key allows entering, say, euro sign 18 | # or accents (using deadkeys in level 3) 19 | # Look xkeyboard_config package source. 20 | layout = "us(altgr-intl),ru(common),gr(basic)"; 21 | xkbOptions = "grp:caps_toggle, grp_led:caps, lv3:lwin_switch, terminate:ctrl_alt_bksp"; 22 | 23 | #useXFS = "unix/:7100"; 24 | driSupport = true; 25 | 26 | serverLayoutSection = '' 27 | Option "AIGLX" "true" 28 | ''; 29 | 30 | desktopManager.xfce.enable = false; 31 | 32 | } 33 | --------------------------------------------------------------------------------