NixOS 22.05
This commit is contained in:
parent
c8c0619b16
commit
3ba6242f11
8
README
8
README
|
@ -10,13 +10,11 @@ mount /dev/disk/by-label/nixos /mnt
|
||||||
mkdir -p /mnt/boot
|
mkdir -p /mnt/boot
|
||||||
mount /dev/disk/by-label/boot /mnt/boot
|
mount /dev/disk/by-label/boot /mnt/boot
|
||||||
nixos-generate-config --root /mnt
|
nixos-generate-config --root /mnt
|
||||||
# copy bootstrap configuration to /mnt/etc/nixos
|
# copy configuration to /mnt/etc/nixos
|
||||||
nixos-install
|
nix-env -i git
|
||||||
|
nixos-install --flake /mnt/etc/nixos#artiq
|
||||||
reboot
|
reboot
|
||||||
# run memtest86
|
# run memtest86
|
||||||
# copy final configuration to /etc/nixos
|
|
||||||
nixos-rebuild --upgrade boot
|
|
||||||
reboot
|
|
||||||
|
|
||||||
After installation is finalized:
|
After installation is finalized:
|
||||||
* copy device database to ~/artiq
|
* copy device database to ~/artiq
|
||||||
|
|
|
@ -1,53 +0,0 @@
|
||||||
{ config, pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
imports =
|
|
||||||
[
|
|
||||||
./hardware-configuration.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
boot.loader.systemd-boot.enable = true;
|
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
|
||||||
boot.loader.systemd-boot.memtest86.enable = true;
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
|
||||||
|
|
||||||
networking.hostName = "artiq";
|
|
||||||
|
|
||||||
time.timeZone = "Asia/Hong_Kong";
|
|
||||||
|
|
||||||
networking.useDHCP = false;
|
|
||||||
networking.interfaces.enp89s0.useDHCP = true;
|
|
||||||
|
|
||||||
services.openssh.enable = true;
|
|
||||||
services.openssh.passwordAuthentication = false;
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [ git ];
|
|
||||||
|
|
||||||
users.extraUsers.rabi = {
|
|
||||||
isNormalUser = true;
|
|
||||||
extraGroups = ["wheel"];
|
|
||||||
openssh.authorizedKeys.keys = [
|
|
||||||
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCyPk5WyFoWSvF4ozehxcVBoZ+UHgrI7VW/OoQfFFwIQe0qvetUZBMZwR2FwkLPAMZV8zz1v4EfncudEkVghy4P+/YVLlDjqDq9zwZnh8Nd/ifu84wmcNWHT2UcqnhjniCdshL8a44memzABnxfLLv+sXhP2x32cJAamo5y6fukr2qLp2jbXzR+3sv3klE0ruUXis/BR1lLqNJEYP8jB6fLn2sLKinnZPfn6DwVOk10mGeQsdME/eGl3phpjhODH9JW5V2V5nJBbC0rBnq+78dyArKVqjPSmIcSy72DEIpTctnMEN1W34BGrnsDd5Xd/DKxKxHKTMCHtZRwLC2X0NWN"
|
|
||||||
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCMALVC8RDTHec+PC8y1s3tcpUAODgq6DEzQdHDf/cyvDMfmCaPiMxfIdmkns5lMa03hymIfSmLUF0jFFDc7biRp7uf9AAXNsrTmplHii0l0McuOOZGlSdZM4eL817P7UwJqFMxJyFXDjkubhQiX6kp25Kfuj/zLnupRCaiDvE7ho/xay6Jrv0XLz935TPDwkc7W1asLIvsZLheB+sRz9SMOb9gtrvk5WXZl5JTOFOLu+JaRwQLHL/xdcHJTOod7tqHYfpoC5JHrEwKzbhTOwxZBQBfTQjQktKENQtBxXHTe71rUEWfEZQGg60/BC4BrRmh4qJjlJu3v4VIhC7SSHn1"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
users.extraUsers.root = {
|
|
||||||
openssh.authorizedKeys.keys = [
|
|
||||||
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCyPk5WyFoWSvF4ozehxcVBoZ+UHgrI7VW/OoQfFFwIQe0qvetUZBMZwR2FwkLPAMZV8zz1v4EfncudEkVghy4P+/YVLlDjqDq9zwZnh8Nd/ifu84wmcNWHT2UcqnhjniCdshL8a44memzABnxfLLv+sXhP2x32cJAamo5y6fukr2qLp2jbXzR+3sv3klE0ruUXis/BR1lLqNJEYP8jB6fLn2sLKinnZPfn6DwVOk10mGeQsdME/eGl3phpjhODH9JW5V2V5nJBbC0rBnq+78dyArKVqjPSmIcSy72DEIpTctnMEN1W34BGrnsDd5Xd/DKxKxHKTMCHtZRwLC2X0NWN"
|
|
||||||
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCMALVC8RDTHec+PC8y1s3tcpUAODgq6DEzQdHDf/cyvDMfmCaPiMxfIdmkns5lMa03hymIfSmLUF0jFFDc7biRp7uf9AAXNsrTmplHii0l0McuOOZGlSdZM4eL817P7UwJqFMxJyFXDjkubhQiX6kp25Kfuj/zLnupRCaiDvE7ho/xay6Jrv0XLz935TPDwkc7W1asLIvsZLheB+sRz9SMOb9gtrvk5WXZl5JTOFOLu+JaRwQLHL/xdcHJTOod7tqHYfpoC5JHrEwKzbhTOwxZBQBfTQjQktKENQtBxXHTe71rUEWfEZQGg60/BC4BrRmh4qJjlJu3v4VIhC7SSHn1"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
security.sudo.wheelNeedsPassword = false;
|
|
||||||
nix.package = pkgs.nix_2_4;
|
|
||||||
nix.extraOptions = ''
|
|
||||||
experimental-features = nix-command flakes
|
|
||||||
'';
|
|
||||||
|
|
||||||
# This value determines the NixOS release from which the default
|
|
||||||
# settings for stateful data, like file locations and database versions
|
|
||||||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
|
||||||
# this value at the release version of the first install of this system.
|
|
||||||
# Before changing this value read the documentation for this option
|
|
||||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
|
||||||
system.stateVersion = "21.11"; # Did you read the comment?
|
|
||||||
}
|
|
|
@ -8,7 +8,7 @@
|
||||||
|
|
||||||
boot.loader.systemd-boot.enable = true;
|
boot.loader.systemd-boot.enable = true;
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
boot.kernelPackages = pkgs.linuxPackages_5_15;
|
boot.loader.systemd-boot.memtest86.enable = true;
|
||||||
hardware.cpu.intel.updateMicrocode = true;
|
hardware.cpu.intel.updateMicrocode = true;
|
||||||
|
|
||||||
networking.hostName = "artiq";
|
networking.hostName = "artiq";
|
||||||
|
@ -58,7 +58,7 @@
|
||||||
artiq.packages.x86_64-linux.openocd-bscanspi
|
artiq.packages.x86_64-linux.openocd-bscanspi
|
||||||
texlive.combined.scheme-full
|
texlive.combined.scheme-full
|
||||||
psmisc
|
psmisc
|
||||||
xc3sprog
|
#xc3sprog
|
||||||
gtkwave
|
gtkwave
|
||||||
unzip
|
unzip
|
||||||
zip
|
zip
|
||||||
|
@ -98,9 +98,11 @@
|
||||||
users.mutableUsers = true;
|
users.mutableUsers = true;
|
||||||
users.defaultUserShell = pkgs.fish;
|
users.defaultUserShell = pkgs.fish;
|
||||||
users.extraGroups.plugdev = { };
|
users.extraGroups.plugdev = { };
|
||||||
|
users.extraUsers.root.initialPassword = "rabi";
|
||||||
users.extraUsers.rabi = {
|
users.extraUsers.rabi = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
extraGroups = ["networkmanager" "wheel" "plugdev" "dialout" "wireshark"];
|
extraGroups = ["networkmanager" "wheel" "plugdev" "dialout" "wireshark"];
|
||||||
|
initialPassword = "rabi";
|
||||||
openssh.authorizedKeys.keys = [
|
openssh.authorizedKeys.keys = [
|
||||||
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCyPk5WyFoWSvF4ozehxcVBoZ+UHgrI7VW/OoQfFFwIQe0qvetUZBMZwR2FwkLPAMZV8zz1v4EfncudEkVghy4P+/YVLlDjqDq9zwZnh8Nd/ifu84wmcNWHT2UcqnhjniCdshL8a44memzABnxfLLv+sXhP2x32cJAamo5y6fukr2qLp2jbXzR+3sv3klE0ruUXis/BR1lLqNJEYP8jB6fLn2sLKinnZPfn6DwVOk10mGeQsdME/eGl3phpjhODH9JW5V2V5nJBbC0rBnq+78dyArKVqjPSmIcSy72DEIpTctnMEN1W34BGrnsDd5Xd/DKxKxHKTMCHtZRwLC2X0NWN"
|
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCyPk5WyFoWSvF4ozehxcVBoZ+UHgrI7VW/OoQfFFwIQe0qvetUZBMZwR2FwkLPAMZV8zz1v4EfncudEkVghy4P+/YVLlDjqDq9zwZnh8Nd/ifu84wmcNWHT2UcqnhjniCdshL8a44memzABnxfLLv+sXhP2x32cJAamo5y6fukr2qLp2jbXzR+3sv3klE0ruUXis/BR1lLqNJEYP8jB6fLn2sLKinnZPfn6DwVOk10mGeQsdME/eGl3phpjhODH9JW5V2V5nJBbC0rBnq+78dyArKVqjPSmIcSy72DEIpTctnMEN1W34BGrnsDd5Xd/DKxKxHKTMCHtZRwLC2X0NWN"
|
||||||
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCMALVC8RDTHec+PC8y1s3tcpUAODgq6DEzQdHDf/cyvDMfmCaPiMxfIdmkns5lMa03hymIfSmLUF0jFFDc7biRp7uf9AAXNsrTmplHii0l0McuOOZGlSdZM4eL817P7UwJqFMxJyFXDjkubhQiX6kp25Kfuj/zLnupRCaiDvE7ho/xay6Jrv0XLz935TPDwkc7W1asLIvsZLheB+sRz9SMOb9gtrvk5WXZl5JTOFOLu+JaRwQLHL/xdcHJTOod7tqHYfpoC5JHrEwKzbhTOwxZBQBfTQjQktKENQtBxXHTe71rUEWfEZQGg60/BC4BrRmh4qJjlJu3v4VIhC7SSHn1"
|
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCMALVC8RDTHec+PC8y1s3tcpUAODgq6DEzQdHDf/cyvDMfmCaPiMxfIdmkns5lMa03hymIfSmLUF0jFFDc7biRp7uf9AAXNsrTmplHii0l0McuOOZGlSdZM4eL817P7UwJqFMxJyFXDjkubhQiX6kp25Kfuj/zLnupRCaiDvE7ho/xay6Jrv0XLz935TPDwkc7W1asLIvsZLheB+sRz9SMOb9gtrvk5WXZl5JTOFOLu+JaRwQLHL/xdcHJTOod7tqHYfpoC5JHrEwKzbhTOwxZBQBfTQjQktKENQtBxXHTe71rUEWfEZQGg60/BC4BrRmh4qJjlJu3v4VIhC7SSHn1"
|
||||||
|
@ -109,7 +111,6 @@
|
||||||
security.sudo.wheelNeedsPassword = false;
|
security.sudo.wheelNeedsPassword = false;
|
||||||
services.udev.packages = [ artiq.packages.x86_64-linux.openocd-bscanspi ];
|
services.udev.packages = [ artiq.packages.x86_64-linux.openocd-bscanspi ];
|
||||||
|
|
||||||
nix.package = pkgs.nix_2_4;
|
|
||||||
nix.binaryCachePublicKeys = ["nixbld.m-labs.hk-1:5aSRVA5b320xbNvu30tqxVPXpld73bhtOeH6uAjRyHc="];
|
nix.binaryCachePublicKeys = ["nixbld.m-labs.hk-1:5aSRVA5b320xbNvu30tqxVPXpld73bhtOeH6uAjRyHc="];
|
||||||
nix.binaryCaches = ["https://nixbld.m-labs.hk" "https://cache.nixos.org"];
|
nix.binaryCaches = ["https://nixbld.m-labs.hk" "https://cache.nixos.org"];
|
||||||
nix.extraOptions = ''
|
nix.extraOptions = ''
|
||||||
|
@ -121,5 +122,5 @@
|
||||||
# compatible, in order to avoid breaking some software such as database
|
# compatible, in order to avoid breaking some software such as database
|
||||||
# servers. You should change this only after NixOS release notes say you
|
# servers. You should change this only after NixOS release notes say you
|
||||||
# should.
|
# should.
|
||||||
system.stateVersion = "21.11"; # Did you read the comment?
|
system.stateVersion = "22.05"; # Did you read the comment?
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
nixosConfigurations.artiq = artiq.inputs.nixpkgs.lib.nixosSystem {
|
nixosConfigurations.artiq = artiq.inputs.nixpkgs.lib.nixosSystem {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
specialArgs = { inherit artiq; };
|
specialArgs = { inherit artiq; };
|
||||||
modules = [ ./configuration.nix ./spyder ];
|
modules = [ ./configuration.nix ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,31 +0,0 @@
|
||||||
{ lib, fetchPypi, buildPythonPackage, pycodestyle, glibcLocales
|
|
||||||
, toml
|
|
||||||
}:
|
|
||||||
|
|
||||||
buildPythonPackage rec {
|
|
||||||
pname = "autopep8";
|
|
||||||
version = "1.6.0";
|
|
||||||
|
|
||||||
src = fetchPypi {
|
|
||||||
inherit pname version;
|
|
||||||
sha256 = "sha256-RPCTKFUDnSwVxFENbfZl5HMPK4WCcE+kj5xVvT4X2Xk=";
|
|
||||||
};
|
|
||||||
|
|
||||||
propagatedBuildInputs = [ pycodestyle toml ];
|
|
||||||
|
|
||||||
# One test fails:
|
|
||||||
# FAIL: test_recursive_should_not_crash_on_unicode_filename (test.test_autopep8.CommandLineTests)
|
|
||||||
# doCheck = false;
|
|
||||||
|
|
||||||
checkInputs = [ glibcLocales ];
|
|
||||||
|
|
||||||
LC_ALL = "en_US.UTF-8";
|
|
||||||
|
|
||||||
meta = with lib; {
|
|
||||||
description = "A tool that automatically formats Python code to conform to the PEP 8 style guide";
|
|
||||||
homepage = "https://pypi.python.org/pypi/autopep8/";
|
|
||||||
license = licenses.mit;
|
|
||||||
platforms = platforms.all;
|
|
||||||
maintainers = with maintainers; [ bjornfor ];
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,85 +0,0 @@
|
||||||
{ stdenv, lib
|
|
||||||
, buildPythonPackage, fetchPypi, pythonOlder, setuptools-scm, pytestCheckHook
|
|
||||||
, aiohttp
|
|
||||||
, aiohttp-cors
|
|
||||||
, attrs
|
|
||||||
, click
|
|
||||||
, colorama
|
|
||||||
, dataclasses
|
|
||||||
, mypy-extensions
|
|
||||||
, pathspec
|
|
||||||
, parameterized
|
|
||||||
, platformdirs
|
|
||||||
, regex
|
|
||||||
, tomli
|
|
||||||
, typed-ast
|
|
||||||
, typing-extensions
|
|
||||||
, uvloop
|
|
||||||
}:
|
|
||||||
|
|
||||||
|
|
||||||
buildPythonPackage rec {
|
|
||||||
pname = "black";
|
|
||||||
version = "22.3.0";
|
|
||||||
|
|
||||||
disabled = pythonOlder "3.6";
|
|
||||||
|
|
||||||
src = fetchPypi {
|
|
||||||
inherit pname version;
|
|
||||||
sha256 = "sha256-NQILiIbAIs7ZKCtRtah1ttGrDDh7MaBluE23wzCFynk=";
|
|
||||||
};
|
|
||||||
|
|
||||||
nativeBuildInputs = [ setuptools-scm ];
|
|
||||||
|
|
||||||
# Necessary for the tests to pass on Darwin with sandbox enabled.
|
|
||||||
# Black starts a local server and needs to bind a local address.
|
|
||||||
__darwinAllowLocalNetworking = true;
|
|
||||||
|
|
||||||
checkInputs = [ pytestCheckHook parameterized ];
|
|
||||||
|
|
||||||
preCheck = ''
|
|
||||||
export PATH="$PATH:$out/bin"
|
|
||||||
|
|
||||||
# The top directory /build matches black's DEFAULT_EXCLUDE regex.
|
|
||||||
# Make /build the project root for black tests to avoid excluding files.
|
|
||||||
touch ../.git
|
|
||||||
'' + lib.optionalString stdenv.isDarwin ''
|
|
||||||
# Work around https://github.com/psf/black/issues/2105
|
|
||||||
export TMPDIR="/tmp"
|
|
||||||
'';
|
|
||||||
|
|
||||||
disabledTests = [
|
|
||||||
# requires network access
|
|
||||||
"test_gen_check_output"
|
|
||||||
] ++ lib.optionals stdenv.isDarwin [
|
|
||||||
# fails on darwin
|
|
||||||
"test_expression_diff"
|
|
||||||
# Fail on Hydra, see https://github.com/NixOS/nixpkgs/pull/130785
|
|
||||||
"test_bpo_2142_workaround"
|
|
||||||
"test_skip_magic_trailing_comma"
|
|
||||||
];
|
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
|
||||||
aiohttp
|
|
||||||
aiohttp-cors
|
|
||||||
attrs
|
|
||||||
click
|
|
||||||
colorama
|
|
||||||
mypy-extensions
|
|
||||||
pathspec
|
|
||||||
platformdirs
|
|
||||||
regex
|
|
||||||
tomli
|
|
||||||
typed-ast # required for tests and python2 extra
|
|
||||||
uvloop
|
|
||||||
] ++ lib.optional (pythonOlder "3.7") dataclasses
|
|
||||||
++ lib.optional (pythonOlder "3.8") typing-extensions;
|
|
||||||
|
|
||||||
meta = with lib; {
|
|
||||||
description = "The uncompromising Python code formatter";
|
|
||||||
homepage = "https://github.com/psf/black";
|
|
||||||
changelog = "https://github.com/psf/black/blob/${version}/CHANGES.md";
|
|
||||||
license = licenses.mit;
|
|
||||||
maintainers = with maintainers; [ sveitser autophagy ];
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,23 +0,0 @@
|
||||||
{ config, pkgs, ... }:
|
|
||||||
{
|
|
||||||
# https://github.com/NixOS/nixpkgs/issues/171613
|
|
||||||
nixpkgs.overlays = [ (self: super: rec {
|
|
||||||
python3 = super.python3.override {
|
|
||||||
packageOverrides = pyself: pysuper: {
|
|
||||||
autopep8 = pysuper.pkgs.python3Packages.callPackage ./autopep8 {};
|
|
||||||
black = pysuper.pkgs.python3Packages.callPackage ./black {};
|
|
||||||
ipykernel = pysuper.pkgs.python3Packages.callPackage ./ipykernel {};
|
|
||||||
ipython = pysuper.pkgs.python3Packages.callPackage ./ipython {};
|
|
||||||
jupyter-client = pysuper.pkgs.python3Packages.callPackage ./jupyter-client {};
|
|
||||||
python-lsp-black = pysuper.pkgs.python3Packages.callPackage ./python-lsp-black {};
|
|
||||||
python-lsp-server = pysuper.pkgs.python3Packages.callPackage ./python-lsp-server {};
|
|
||||||
qdarkstyle = pysuper.pkgs.python3Packages.callPackage ./qdarkstyle {};
|
|
||||||
qtconsole = pysuper.pkgs.python3Packages.callPackage ./qtconsole {};
|
|
||||||
qtpy = pysuper.pkgs.python3Packages.callPackage ./qtpy {};
|
|
||||||
spyder-kernels = pysuper.pkgs.python3Packages.callPackage ./spyder-kernels {};
|
|
||||||
spyder = pysuper.pkgs.python3Packages.callPackage ./spyder {};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
python3Packages = python3.pkgs;
|
|
||||||
}) ];
|
|
||||||
}
|
|
|
@ -1,41 +0,0 @@
|
||||||
{ lib
|
|
||||||
, buildPythonPackage
|
|
||||||
, fetchPypi
|
|
||||||
, nose
|
|
||||||
, isPy27
|
|
||||||
, mock
|
|
||||||
, ipython
|
|
||||||
, jupyter-client
|
|
||||||
, pexpect
|
|
||||||
, traitlets
|
|
||||||
, tornado
|
|
||||||
}:
|
|
||||||
|
|
||||||
buildPythonPackage rec {
|
|
||||||
pname = "ipykernel";
|
|
||||||
version = "4.10.1";
|
|
||||||
|
|
||||||
src = fetchPypi {
|
|
||||||
inherit pname version;
|
|
||||||
sha256 = "eeb74b2bcfe0ced5a7900361f98fa1171288aa47ed4b522efe5acb167c6cf5fb";
|
|
||||||
};
|
|
||||||
|
|
||||||
checkInputs = [ nose ] ++ lib.optional isPy27 mock;
|
|
||||||
propagatedBuildInputs = [
|
|
||||||
ipython
|
|
||||||
jupyter-client
|
|
||||||
pexpect
|
|
||||||
traitlets
|
|
||||||
tornado
|
|
||||||
];
|
|
||||||
|
|
||||||
# Tests require backends.
|
|
||||||
# I don't want to add all supported backends as propagatedBuildInputs
|
|
||||||
doCheck = false;
|
|
||||||
|
|
||||||
meta = {
|
|
||||||
description = "IPython Kernel for Jupyter";
|
|
||||||
homepage = "http://ipython.org/";
|
|
||||||
license = lib.licenses.bsd3;
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,50 +0,0 @@
|
||||||
{ lib
|
|
||||||
, buildPythonPackage
|
|
||||||
, callPackage
|
|
||||||
, fetchPypi
|
|
||||||
, pythonOlder
|
|
||||||
, argcomplete
|
|
||||||
, debugpy
|
|
||||||
, ipython
|
|
||||||
, jupyter-client
|
|
||||||
, tornado
|
|
||||||
, traitlets
|
|
||||||
, psutil
|
|
||||||
, packaging
|
|
||||||
}:
|
|
||||||
|
|
||||||
buildPythonPackage rec {
|
|
||||||
pname = "ipykernel";
|
|
||||||
version = "6.13.0";
|
|
||||||
|
|
||||||
src = fetchPypi {
|
|
||||||
inherit pname version;
|
|
||||||
sha256 = "sha256-DignPikIWDk+huFSsQTlUGp5wT0luVGsbsoiAFG0vmA=";
|
|
||||||
};
|
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
|
||||||
debugpy
|
|
||||||
ipython
|
|
||||||
jupyter-client
|
|
||||||
tornado
|
|
||||||
traitlets
|
|
||||||
psutil
|
|
||||||
packaging
|
|
||||||
] ++ lib.optionals (pythonOlder "3.8") [
|
|
||||||
argcomplete
|
|
||||||
];
|
|
||||||
|
|
||||||
# check in passthru.tests.pytest to escape infinite recursion with ipyparallel
|
|
||||||
doCheck = false;
|
|
||||||
|
|
||||||
passthru.tests = {
|
|
||||||
pytest = callPackage ./tests.nix { };
|
|
||||||
};
|
|
||||||
|
|
||||||
meta = {
|
|
||||||
description = "IPython Kernel for Jupyter";
|
|
||||||
homepage = "http://ipython.org/";
|
|
||||||
license = lib.licenses.bsd3;
|
|
||||||
maintainers = with lib.maintainers; [ fridh ];
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,57 +0,0 @@
|
||||||
{ lib
|
|
||||||
, stdenv
|
|
||||||
, buildPythonPackage
|
|
||||||
, pythonOlder
|
|
||||||
, flaky
|
|
||||||
, ipykernel
|
|
||||||
, ipyparallel
|
|
||||||
, nose
|
|
||||||
, pytestCheckHook
|
|
||||||
|
|
||||||
}:
|
|
||||||
|
|
||||||
buildPythonPackage rec {
|
|
||||||
pname = "ipykernel-tests";
|
|
||||||
inherit (ipykernel) version;
|
|
||||||
|
|
||||||
src = ipykernel.src;
|
|
||||||
|
|
||||||
dontBuild = true;
|
|
||||||
dontInstall = true;
|
|
||||||
|
|
||||||
checkInputs = [
|
|
||||||
flaky
|
|
||||||
ipykernel
|
|
||||||
ipyparallel
|
|
||||||
nose
|
|
||||||
pytestCheckHook
|
|
||||||
];
|
|
||||||
|
|
||||||
preCheck = ''
|
|
||||||
export HOME=$(mktemp -d)
|
|
||||||
'';
|
|
||||||
|
|
||||||
disabledTests = lib.optionals stdenv.isDarwin ([
|
|
||||||
# see https://github.com/NixOS/nixpkgs/issues/76197
|
|
||||||
"test_subprocess_print"
|
|
||||||
"test_subprocess_error"
|
|
||||||
"test_ipython_start_kernel_no_userns"
|
|
||||||
|
|
||||||
# https://github.com/ipython/ipykernel/issues/506
|
|
||||||
"test_unc_paths"
|
|
||||||
] ++ lib.optionals (pythonOlder "3.8") [
|
|
||||||
# flaky test https://github.com/ipython/ipykernel/issues/485
|
|
||||||
"test_shutdown"
|
|
||||||
|
|
||||||
# test regression https://github.com/ipython/ipykernel/issues/486
|
|
||||||
"test_sys_path_profile_dir"
|
|
||||||
"test_save_history"
|
|
||||||
"test_help_output"
|
|
||||||
"test_write_kernel_spec"
|
|
||||||
"test_ipython_start_kernel_userns"
|
|
||||||
"ZMQDisplayPublisherTests"
|
|
||||||
]);
|
|
||||||
|
|
||||||
# Some of the tests use localhost networking.
|
|
||||||
__darwinAllowLocalNetworking = true;
|
|
||||||
}
|
|
|
@ -1,72 +0,0 @@
|
||||||
{ lib
|
|
||||||
, stdenv
|
|
||||||
, buildPythonPackage
|
|
||||||
, fetchPypi
|
|
||||||
, fetchpatch
|
|
||||||
# Build dependencies
|
|
||||||
, glibcLocales
|
|
||||||
# Test dependencies
|
|
||||||
, nose
|
|
||||||
, pygments
|
|
||||||
, testpath
|
|
||||||
, isPy27
|
|
||||||
, mock
|
|
||||||
# Runtime dependencies
|
|
||||||
, backports_shutil_get_terminal_size
|
|
||||||
, decorator
|
|
||||||
, pathlib2
|
|
||||||
, pickleshare
|
|
||||||
, requests
|
|
||||||
, simplegeneric
|
|
||||||
, traitlets
|
|
||||||
, prompt-toolkit
|
|
||||||
, pexpect
|
|
||||||
, appnope
|
|
||||||
}:
|
|
||||||
|
|
||||||
buildPythonPackage rec {
|
|
||||||
pname = "ipython";
|
|
||||||
version = "5.8.0";
|
|
||||||
|
|
||||||
src = fetchPypi {
|
|
||||||
inherit pname version;
|
|
||||||
sha256 = "4bac649857611baaaf76bc82c173aa542f7486446c335fe1a6c05d0d491c8906";
|
|
||||||
};
|
|
||||||
|
|
||||||
prePatch = lib.optionalString stdenv.isDarwin ''
|
|
||||||
substituteInPlace setup.py --replace "'gnureadline'" " "
|
|
||||||
'';
|
|
||||||
|
|
||||||
patches = [
|
|
||||||
# Use the proper pygments lexer for python2 (https://github.com/ipython/ipython/pull/12095)
|
|
||||||
(fetchpatch {
|
|
||||||
name = "python2-lexer.patch";
|
|
||||||
url = "https://github.com/ipython/ipython/pull/12095/commits/8805293b5e4bce9150cc2ad9c5d6d984849ae447.patch";
|
|
||||||
sha256 = "16p4gl7a49v76w33j39ih7yspy6x2d14p9bh4wdpg9cafhw9nbc0";
|
|
||||||
})
|
|
||||||
];
|
|
||||||
|
|
||||||
buildInputs = [ glibcLocales ];
|
|
||||||
|
|
||||||
checkInputs = [ nose pygments testpath ] ++ lib.optional isPy27 mock;
|
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
|
||||||
backports_shutil_get_terminal_size decorator pickleshare prompt-toolkit
|
|
||||||
simplegeneric traitlets requests pathlib2 pexpect
|
|
||||||
] ++ lib.optionals stdenv.isDarwin [ appnope ];
|
|
||||||
|
|
||||||
LC_ALL="en_US.UTF-8";
|
|
||||||
|
|
||||||
doCheck = false; # Circular dependency with ipykernel
|
|
||||||
|
|
||||||
checkPhase = ''
|
|
||||||
nosetests
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = {
|
|
||||||
description = "IPython: Productive Interactive Computing";
|
|
||||||
homepage = "http://ipython.org/";
|
|
||||||
license = lib.licenses.bsd3;
|
|
||||||
maintainers = with lib.maintainers; [ bjornfor orivej lnl7 ];
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,69 +0,0 @@
|
||||||
{ lib
|
|
||||||
, stdenv
|
|
||||||
, buildPythonPackage
|
|
||||||
, fetchPypi
|
|
||||||
, pythonOlder
|
|
||||||
# Build dependencies
|
|
||||||
, glibcLocales
|
|
||||||
# Test dependencies
|
|
||||||
, nose
|
|
||||||
, pygments
|
|
||||||
# Runtime dependencies
|
|
||||||
, jedi
|
|
||||||
, decorator
|
|
||||||
, pickleshare
|
|
||||||
, traitlets
|
|
||||||
, prompt-toolkit
|
|
||||||
, pexpect
|
|
||||||
, appnope
|
|
||||||
, backcall
|
|
||||||
}:
|
|
||||||
|
|
||||||
buildPythonPackage rec {
|
|
||||||
pname = "ipython";
|
|
||||||
version = "7.16.1";
|
|
||||||
disabled = pythonOlder "3.6";
|
|
||||||
|
|
||||||
src = fetchPypi {
|
|
||||||
inherit pname version;
|
|
||||||
sha256 = "9f4fcb31d3b2c533333893b9172264e4821c1ac91839500f31bd43f2c59b3ccf";
|
|
||||||
};
|
|
||||||
|
|
||||||
prePatch = lib.optionalString stdenv.isDarwin ''
|
|
||||||
substituteInPlace setup.py --replace "'gnureadline'" " "
|
|
||||||
'';
|
|
||||||
|
|
||||||
buildInputs = [ glibcLocales ];
|
|
||||||
|
|
||||||
checkInputs = [ nose pygments ];
|
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
|
||||||
jedi
|
|
||||||
decorator
|
|
||||||
pickleshare
|
|
||||||
traitlets
|
|
||||||
prompt-toolkit
|
|
||||||
pygments
|
|
||||||
pexpect
|
|
||||||
backcall
|
|
||||||
] ++ lib.optionals stdenv.isDarwin [appnope];
|
|
||||||
|
|
||||||
LC_ALL="en_US.UTF-8";
|
|
||||||
|
|
||||||
doCheck = false; # Circular dependency with ipykernel
|
|
||||||
|
|
||||||
checkPhase = ''
|
|
||||||
nosetests
|
|
||||||
'';
|
|
||||||
|
|
||||||
pythonImportsCheck = [
|
|
||||||
"IPython"
|
|
||||||
];
|
|
||||||
|
|
||||||
meta = with lib; {
|
|
||||||
description = "IPython: Productive Interactive Computing";
|
|
||||||
homepage = "http://ipython.org/";
|
|
||||||
license = licenses.bsd3;
|
|
||||||
maintainers = with maintainers; [ bjornfor fridh ];
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,73 +0,0 @@
|
||||||
{ lib
|
|
||||||
, stdenv
|
|
||||||
, buildPythonPackage
|
|
||||||
, fetchPypi
|
|
||||||
, fetchpatch
|
|
||||||
, pythonOlder
|
|
||||||
# Build dependencies
|
|
||||||
, glibcLocales
|
|
||||||
# Test dependencies
|
|
||||||
, nose
|
|
||||||
, pygments
|
|
||||||
# Runtime dependencies
|
|
||||||
, jedi
|
|
||||||
, decorator
|
|
||||||
, matplotlib-inline
|
|
||||||
, pickleshare
|
|
||||||
, traitlets
|
|
||||||
, prompt-toolkit
|
|
||||||
, pexpect
|
|
||||||
, appnope
|
|
||||||
, backcall
|
|
||||||
, pytest
|
|
||||||
}:
|
|
||||||
|
|
||||||
buildPythonPackage rec {
|
|
||||||
pname = "ipython";
|
|
||||||
version = "7.33.0";
|
|
||||||
disabled = pythonOlder "3.7";
|
|
||||||
|
|
||||||
src = fetchPypi {
|
|
||||||
inherit pname version;
|
|
||||||
sha256 = "sha256-vP+4Zag7CBYgMBug7E2VCERU8muR1tZrR1v/PfsCGNQ=";
|
|
||||||
};
|
|
||||||
|
|
||||||
prePatch = lib.optionalString stdenv.isDarwin ''
|
|
||||||
substituteInPlace setup.py --replace "'gnureadline'" " "
|
|
||||||
'';
|
|
||||||
|
|
||||||
buildInputs = [ glibcLocales ];
|
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
|
||||||
jedi
|
|
||||||
decorator
|
|
||||||
matplotlib-inline
|
|
||||||
pickleshare
|
|
||||||
traitlets
|
|
||||||
prompt-toolkit
|
|
||||||
pygments
|
|
||||||
pexpect
|
|
||||||
backcall
|
|
||||||
] ++ lib.optionals stdenv.isDarwin [appnope];
|
|
||||||
|
|
||||||
LC_ALL="en_US.UTF-8";
|
|
||||||
|
|
||||||
# full tests normally disabled due to a circular dependency with
|
|
||||||
# ipykernel, but we want to test the CVE-2022-21699 fix in this
|
|
||||||
# branch
|
|
||||||
checkInputs = [ pytest ];
|
|
||||||
checkPhase = ''
|
|
||||||
pytest IPython/tests/cve.py
|
|
||||||
'';
|
|
||||||
|
|
||||||
pythonImportsCheck = [
|
|
||||||
"IPython"
|
|
||||||
];
|
|
||||||
|
|
||||||
meta = with lib; {
|
|
||||||
description = "IPython: Productive Interactive Computing";
|
|
||||||
homepage = "http://ipython.org/";
|
|
||||||
license = licenses.bsd3;
|
|
||||||
maintainers = with maintainers; [ bjornfor fridh ];
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,40 +0,0 @@
|
||||||
{ lib
|
|
||||||
, buildPythonPackage
|
|
||||||
, fetchPypi
|
|
||||||
, traitlets
|
|
||||||
, jupyter_core
|
|
||||||
, pyzmq
|
|
||||||
, python-dateutil
|
|
||||||
, isPyPy
|
|
||||||
, py
|
|
||||||
, tornado
|
|
||||||
}:
|
|
||||||
|
|
||||||
buildPythonPackage rec {
|
|
||||||
pname = "jupyter-client";
|
|
||||||
version = "5.3.5";
|
|
||||||
|
|
||||||
src = fetchPypi {
|
|
||||||
pname = "jupyter_client";
|
|
||||||
inherit version;
|
|
||||||
sha256 = "5efdf4131124d4a0d5789101e74827022585f172d2f4b60cf6fa98e0a7511b25";
|
|
||||||
};
|
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
|
||||||
traitlets
|
|
||||||
jupyter_core
|
|
||||||
pyzmq
|
|
||||||
python-dateutil
|
|
||||||
tornado
|
|
||||||
] ++ lib.optional isPyPy py;
|
|
||||||
|
|
||||||
# Circular dependency with ipykernel
|
|
||||||
doCheck = false;
|
|
||||||
|
|
||||||
meta = {
|
|
||||||
description = "Jupyter protocol implementation and client libraries";
|
|
||||||
homepage = "https://jupyter.org/";
|
|
||||||
license = lib.licenses.bsd3;
|
|
||||||
maintainers = with lib.maintainers; [ ];
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,43 +0,0 @@
|
||||||
{ lib
|
|
||||||
, buildPythonPackage
|
|
||||||
, fetchPypi
|
|
||||||
, entrypoints
|
|
||||||
, jupyter_core
|
|
||||||
, nest-asyncio
|
|
||||||
, python-dateutil
|
|
||||||
, pyzmq
|
|
||||||
, tornado
|
|
||||||
, traitlets
|
|
||||||
, isPyPy
|
|
||||||
, py
|
|
||||||
}:
|
|
||||||
|
|
||||||
buildPythonPackage rec {
|
|
||||||
pname = "jupyter_client";
|
|
||||||
version = "7.1.0";
|
|
||||||
|
|
||||||
src = fetchPypi {
|
|
||||||
inherit pname version;
|
|
||||||
sha256 = "sha256-pfmVpzz/sxTtJicTrm385TxrghbOqfMyBxuP9EpuFlQ=";
|
|
||||||
};
|
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
|
||||||
entrypoints
|
|
||||||
jupyter_core
|
|
||||||
nest-asyncio
|
|
||||||
python-dateutil
|
|
||||||
pyzmq
|
|
||||||
tornado
|
|
||||||
traitlets
|
|
||||||
] ++ lib.optional isPyPy py;
|
|
||||||
|
|
||||||
# Circular dependency with ipykernel
|
|
||||||
doCheck = false;
|
|
||||||
|
|
||||||
meta = {
|
|
||||||
description = "Jupyter protocol implementation and client libraries";
|
|
||||||
homepage = "https://jupyter.org/";
|
|
||||||
license = lib.licenses.bsd3;
|
|
||||||
maintainers = with lib.maintainers; [ fridh ];
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,32 +0,0 @@
|
||||||
{ lib
|
|
||||||
, black
|
|
||||||
, buildPythonPackage
|
|
||||||
, fetchFromGitHub
|
|
||||||
, pytestCheckHook
|
|
||||||
, python-lsp-server
|
|
||||||
, pythonOlder
|
|
||||||
}:
|
|
||||||
|
|
||||||
buildPythonPackage rec {
|
|
||||||
pname = "python-lsp-black";
|
|
||||||
version = "1.2.1";
|
|
||||||
disabled = pythonOlder "3.6";
|
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
|
||||||
owner = "python-lsp";
|
|
||||||
repo = "python-lsp-black";
|
|
||||||
rev = "v${version}";
|
|
||||||
sha256 = "sha256-qNA6Bj1VI0YEtRuvcMQZGWakQNNrJ2PqhozrLmQHPAg=";
|
|
||||||
};
|
|
||||||
|
|
||||||
checkInputs = [ pytestCheckHook ];
|
|
||||||
|
|
||||||
propagatedBuildInputs = [ black python-lsp-server ];
|
|
||||||
|
|
||||||
meta = with lib; {
|
|
||||||
homepage = "https://github.com/python-lsp/python-lsp-black";
|
|
||||||
description = "Black plugin for the Python LSP Server";
|
|
||||||
license = licenses.mit;
|
|
||||||
maintainers = with maintainers; [ cpcloud ];
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,108 +0,0 @@
|
||||||
{ lib
|
|
||||||
, autopep8
|
|
||||||
, buildPythonPackage
|
|
||||||
, fetchPypi
|
|
||||||
, flake8
|
|
||||||
, flaky
|
|
||||||
, jedi
|
|
||||||
, matplotlib
|
|
||||||
, mccabe
|
|
||||||
, numpy
|
|
||||||
, pandas
|
|
||||||
, pluggy
|
|
||||||
, pycodestyle
|
|
||||||
, pydocstyle
|
|
||||||
, pyflakes
|
|
||||||
, pylint
|
|
||||||
, pyqt5
|
|
||||||
, pytestCheckHook
|
|
||||||
, python-lsp-jsonrpc
|
|
||||||
, pythonOlder
|
|
||||||
, rope
|
|
||||||
, setuptools
|
|
||||||
, setuptools_scm
|
|
||||||
, ujson
|
|
||||||
, yapf
|
|
||||||
, withAutopep8 ? true
|
|
||||||
, withFlake8 ? true
|
|
||||||
, withMccabe ? true
|
|
||||||
, withPycodestyle ? true
|
|
||||||
, withPydocstyle ? true
|
|
||||||
, withPyflakes ? true
|
|
||||||
, withPylint ? true
|
|
||||||
, withRope ? true
|
|
||||||
, withYapf ? true
|
|
||||||
}:
|
|
||||||
|
|
||||||
buildPythonPackage rec {
|
|
||||||
pname = "python-lsp-server";
|
|
||||||
version = "1.4.1";
|
|
||||||
disabled = pythonOlder "3.6";
|
|
||||||
|
|
||||||
src = fetchPypi {
|
|
||||||
pname = "python-lsp-server";
|
|
||||||
inherit version;
|
|
||||||
sha256 = "sha256-vn+DKYr58JUak5csr8nbBP189cBfIIElFSdfC6cONC8=";
|
|
||||||
};
|
|
||||||
|
|
||||||
postPatch = ''
|
|
||||||
substituteInPlace setup.cfg \
|
|
||||||
--replace "--cov-report html --cov-report term --junitxml=pytest.xml" "" \
|
|
||||||
--replace "--cov pylsp --cov test" ""
|
|
||||||
'';
|
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
|
||||||
jedi
|
|
||||||
pluggy
|
|
||||||
python-lsp-jsonrpc
|
|
||||||
setuptools
|
|
||||||
setuptools_scm
|
|
||||||
ujson
|
|
||||||
] ++ lib.optional withAutopep8 autopep8
|
|
||||||
++ lib.optional withFlake8 flake8
|
|
||||||
++ lib.optional withMccabe mccabe
|
|
||||||
++ lib.optional withPycodestyle pycodestyle
|
|
||||||
++ lib.optional withPydocstyle pydocstyle
|
|
||||||
++ lib.optional withPyflakes pyflakes
|
|
||||||
++ lib.optional withPylint pylint
|
|
||||||
++ lib.optional withRope rope
|
|
||||||
++ lib.optional withYapf yapf;
|
|
||||||
|
|
||||||
checkInputs = [
|
|
||||||
flaky
|
|
||||||
matplotlib
|
|
||||||
numpy
|
|
||||||
pandas
|
|
||||||
pyqt5
|
|
||||||
pytestCheckHook
|
|
||||||
];
|
|
||||||
|
|
||||||
disabledTests = [
|
|
||||||
# pytlint output changed
|
|
||||||
"test_lint_free_pylint"
|
|
||||||
] ++ lib.optional (!withPycodestyle) "test_workspace_loads_pycodestyle_config";
|
|
||||||
|
|
||||||
disabledTestPaths = lib.optional (!withAutopep8) "test/plugins/test_autopep8_format.py"
|
|
||||||
++ lib.optional (!withRope) "test/plugins/test_completion.py"
|
|
||||||
++ lib.optional (!withFlake8) "test/plugins/test_flake8_lint.py"
|
|
||||||
++ lib.optional (!withMccabe) "test/plugins/test_mccabe_lint.py"
|
|
||||||
++ lib.optional (!withPycodestyle) "test/plugins/test_pycodestyle_lint.py"
|
|
||||||
++ lib.optional (!withPydocstyle) "test/plugins/test_pydocstyle_lint.py"
|
|
||||||
++ lib.optional (!withPyflakes) "test/plugins/test_pyflakes_lint.py"
|
|
||||||
++ lib.optional (!withPylint) "test/plugins/test_pylint_lint.py"
|
|
||||||
++ lib.optional (!withRope) "test/plugins/test_rope_rename.py"
|
|
||||||
++ lib.optional (!withYapf) "test/plugins/test_yapf_format.py";
|
|
||||||
|
|
||||||
preCheck = ''
|
|
||||||
export HOME=$(mktemp -d);
|
|
||||||
'';
|
|
||||||
|
|
||||||
pythonImportsCheck = [ "pylsp" ];
|
|
||||||
|
|
||||||
meta = with lib; {
|
|
||||||
description = "Python implementation of the Language Server Protocol";
|
|
||||||
homepage = "https://github.com/python-lsp/python-lsp-server";
|
|
||||||
license = licenses.mit;
|
|
||||||
maintainers = with maintainers; [ fab ];
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,29 +0,0 @@
|
||||||
{ lib
|
|
||||||
, fetchPypi
|
|
||||||
, buildPythonPackage
|
|
||||||
, helpdev
|
|
||||||
, qtpy
|
|
||||||
}:
|
|
||||||
|
|
||||||
buildPythonPackage rec {
|
|
||||||
pname = "qdarkstyle";
|
|
||||||
version = "3.0.3";
|
|
||||||
|
|
||||||
src = fetchPypi {
|
|
||||||
inherit version;
|
|
||||||
pname = "QDarkStyle";
|
|
||||||
sha256 = "sha256-k20tNbVS9CmAOphdvBf8h5ovlm+qn7+Jg4lsz6M+aPY=";
|
|
||||||
};
|
|
||||||
|
|
||||||
# No tests available
|
|
||||||
doCheck = false;
|
|
||||||
|
|
||||||
propagatedBuildInputs = [ helpdev qtpy ];
|
|
||||||
|
|
||||||
meta = with lib; {
|
|
||||||
description = "A dark stylesheet for Python and Qt applications";
|
|
||||||
homepage = "https://github.com/ColinDuquesnoy/QDarkStyleSheet";
|
|
||||||
license = licenses.mit;
|
|
||||||
maintainers = with maintainers; [ nyanloutre ];
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,38 +0,0 @@
|
||||||
{ lib
|
|
||||||
, buildPythonPackage
|
|
||||||
, fetchPypi
|
|
||||||
, nose
|
|
||||||
, isPy27
|
|
||||||
, mock
|
|
||||||
, traitlets
|
|
||||||
, jupyter_core
|
|
||||||
, jupyter-client
|
|
||||||
, pygments
|
|
||||||
, ipykernel
|
|
||||||
, pyqt5
|
|
||||||
, qtpy
|
|
||||||
}:
|
|
||||||
|
|
||||||
buildPythonPackage rec {
|
|
||||||
pname = "qtconsole";
|
|
||||||
version = "5.3.0";
|
|
||||||
|
|
||||||
src = fetchPypi {
|
|
||||||
inherit pname version;
|
|
||||||
sha256 = "sha256-jjUg/cdeRqvEzGz/7KFvomUnVBCbiug5+ijifR66ViU=";
|
|
||||||
};
|
|
||||||
|
|
||||||
checkInputs = [ nose ] ++ lib.optionals isPy27 [mock];
|
|
||||||
propagatedBuildInputs = [traitlets jupyter_core jupyter-client pygments ipykernel pyqt5 qtpy];
|
|
||||||
|
|
||||||
# : cannot connect to X server
|
|
||||||
doCheck = false;
|
|
||||||
|
|
||||||
meta = {
|
|
||||||
description = "Jupyter Qt console";
|
|
||||||
homepage = "https://jupyter.org/";
|
|
||||||
license = lib.licenses.bsd3;
|
|
||||||
platforms = lib.platforms.unix;
|
|
||||||
maintainers = with lib.maintainers; [ fridh ];
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,27 +0,0 @@
|
||||||
{ lib, buildPythonPackage, fetchPypi, pyside, pytest, packaging }:
|
|
||||||
|
|
||||||
buildPythonPackage rec {
|
|
||||||
pname = "QtPy";
|
|
||||||
version = "2.1.0";
|
|
||||||
|
|
||||||
src = fetchPypi {
|
|
||||||
inherit pname version;
|
|
||||||
sha256 = "sha256-yozUIXF1GGNEKZ7kwPfnrc82LHCFK6NbJVpTQHcCXAY=";
|
|
||||||
};
|
|
||||||
|
|
||||||
propagatedBuildInputs = [ packaging ];
|
|
||||||
|
|
||||||
# no concrete propagatedBuildInputs as multiple backends are supposed
|
|
||||||
checkInputs = [ pyside pytest ];
|
|
||||||
|
|
||||||
doCheck = false; # require X
|
|
||||||
checkPhase = ''
|
|
||||||
py.test qtpy/tests
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = with lib; {
|
|
||||||
description = "Abstraction layer for PyQt5/PyQt4/PySide2/PySide";
|
|
||||||
homepage = "https://github.com/spyder-ide/qtpy";
|
|
||||||
license = licenses.mit;
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,32 +0,0 @@
|
||||||
{ lib, buildPythonPackage, fetchPypi, cloudpickle, ipykernel, wurlitzer,
|
|
||||||
jupyter-client, pyzmq }:
|
|
||||||
|
|
||||||
buildPythonPackage rec {
|
|
||||||
pname = "spyder-kernels";
|
|
||||||
version = "2.3.0";
|
|
||||||
|
|
||||||
src = fetchPypi {
|
|
||||||
inherit pname version;
|
|
||||||
sha256 = "sha256-pdU20Oil53TX1hbBAqj6LWqkX9MwoLeZuY7vFYNW02w=";
|
|
||||||
};
|
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
|
||||||
cloudpickle
|
|
||||||
ipykernel
|
|
||||||
wurlitzer
|
|
||||||
jupyter-client
|
|
||||||
pyzmq
|
|
||||||
];
|
|
||||||
|
|
||||||
# No tests
|
|
||||||
doCheck = false;
|
|
||||||
|
|
||||||
meta = with lib; {
|
|
||||||
description = "Jupyter kernels for Spyder's console";
|
|
||||||
homepage = "https://docs.spyder-ide.org/current/ipythonconsole.html";
|
|
||||||
downloadPage = "https://github.com/spyder-ide/spyder-kernels/releases";
|
|
||||||
changelog = "https://github.com/spyder-ide/spyder-kernels/blob/master/CHANGELOG.md";
|
|
||||||
license = licenses.mit;
|
|
||||||
maintainers = with maintainers; [ gebner ];
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,122 +0,0 @@
|
||||||
{ lib, buildPythonPackage, fetchPypi, isPy27, makeDesktopItem, intervaltree,
|
|
||||||
jedi, pycodestyle, psutil, rope, numpy, scipy, matplotlib, pylint,
|
|
||||||
keyring, numpydoc, qtconsole, qtawesome, nbconvert, mccabe, pyopengl,
|
|
||||||
cloudpickle, pygments, spyder-kernels, qtpy, pyzmq, chardet, qdarkstyle,
|
|
||||||
watchdog, python-lsp-server, pyqtwebengine, atomicwrites, pyxdg,
|
|
||||||
diff-match-patch, three-merge, python-lsp-black, pyls-spyder, flake8, textdistance,
|
|
||||||
cookiecutter, libspatialindex, fetchFromGitHub, pbr, inflection, tinycss2, jellyfish,
|
|
||||||
autopep8
|
|
||||||
}:
|
|
||||||
|
|
||||||
buildPythonPackage rec {
|
|
||||||
pname = "spyder";
|
|
||||||
version = "5.3.0";
|
|
||||||
|
|
||||||
disabled = isPy27;
|
|
||||||
|
|
||||||
src = fetchPypi {
|
|
||||||
inherit pname version;
|
|
||||||
sha256 = "sha256-ggCFvYUdUm5fVSpTZoN/OhNPJAQOyehwrQprYTzprbc=";
|
|
||||||
};
|
|
||||||
|
|
||||||
nativeBuildInputs = [ pyqtwebengine.wrapQtAppsHook ];
|
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
|
||||||
intervaltree jedi pycodestyle psutil rope numpy scipy matplotlib pylint keyring
|
|
||||||
numpydoc qtconsole qtawesome nbconvert mccabe pyopengl cloudpickle spyder-kernels
|
|
||||||
pygments qtpy pyzmq chardet pyqtwebengine qdarkstyle watchdog python-lsp-server
|
|
||||||
atomicwrites pyxdg diff-match-patch three-merge python-lsp-black pyls-spyder
|
|
||||||
flake8 textdistance cookiecutter jellyfish autopep8
|
|
||||||
(
|
|
||||||
buildPythonPackage rec {
|
|
||||||
pname = "Rtree";
|
|
||||||
version = "1.0.0";
|
|
||||||
propagatedBuildInputs = [ numpy ];
|
|
||||||
src = fetchPypi {
|
|
||||||
inherit pname version;
|
|
||||||
sha256 = "sha256-0Eg0ghITRrCTuaQlGNQPkhrfRFkVt66jB+smdoyDloI=";
|
|
||||||
};
|
|
||||||
doCheck = false;
|
|
||||||
patchPhase =
|
|
||||||
''
|
|
||||||
substituteInPlace rtree/finder.py --replace "_candidates = [" "_candidates = ['${libspatialindex}/lib',"
|
|
||||||
'';
|
|
||||||
}
|
|
||||||
)
|
|
||||||
(
|
|
||||||
buildPythonPackage rec {
|
|
||||||
pname = "qstylizer";
|
|
||||||
version = "0.2.1";
|
|
||||||
propagatedBuildInputs = [ pbr inflection tinycss2 ];
|
|
||||||
src = fetchFromGitHub {
|
|
||||||
owner = "blambright";
|
|
||||||
repo = "qstylizer";
|
|
||||||
rev = version;
|
|
||||||
sha256 = "sha256-iEMxBpS9gOPubd9O8zpVmR5B7+UZJFkPuOtikO1a9v0=";
|
|
||||||
};
|
|
||||||
preBuild = ''
|
|
||||||
export PBR_VERSION=${version}
|
|
||||||
'';
|
|
||||||
doCheck = false;
|
|
||||||
}
|
|
||||||
)
|
|
||||||
];
|
|
||||||
|
|
||||||
# There is no test for spyder
|
|
||||||
doCheck = false;
|
|
||||||
|
|
||||||
desktopItem = makeDesktopItem {
|
|
||||||
name = "Spyder";
|
|
||||||
exec = "spyder";
|
|
||||||
icon = "spyder";
|
|
||||||
comment = "Scientific Python Development Environment";
|
|
||||||
desktopName = "Spyder";
|
|
||||||
genericName = "Python IDE";
|
|
||||||
categories = "Development;IDE;";
|
|
||||||
};
|
|
||||||
|
|
||||||
postPatch = ''
|
|
||||||
# remove dependency on pyqtwebengine
|
|
||||||
# this is still part of the pyqt 5.11 version we have in nixpkgs
|
|
||||||
sed -i /pyqtwebengine/d setup.py
|
|
||||||
# The major version bump in watchdog is due to changes in supported
|
|
||||||
# platforms, not API break.
|
|
||||||
# https://github.com/gorakhargosh/watchdog/issues/761#issuecomment-777001518
|
|
||||||
substituteInPlace setup.py \
|
|
||||||
--replace "pyqt5<5.13" "pyqt5" \
|
|
||||||
--replace "parso==0.7.0" "parso" \
|
|
||||||
--replace "watchdog>=0.10.3,<2.0.0" "watchdog>=0.10.3,<3.0.0"
|
|
||||||
'';
|
|
||||||
|
|
||||||
postInstall = ''
|
|
||||||
# add Python libs to env so Spyder subprocesses
|
|
||||||
# created to run compute kernels don't fail with ImportErrors
|
|
||||||
wrapProgram $out/bin/spyder --prefix PYTHONPATH : "$PYTHONPATH"
|
|
||||||
|
|
||||||
# Create desktop item
|
|
||||||
mkdir -p $out/share/icons
|
|
||||||
cp spyder/images/spyder.svg $out/share/icons
|
|
||||||
cp -r $desktopItem/share/applications/ $out/share
|
|
||||||
'';
|
|
||||||
|
|
||||||
dontWrapQtApps = true;
|
|
||||||
|
|
||||||
preFixup = ''
|
|
||||||
makeWrapperArgs+=("''${qtWrapperArgs[@]}")
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = with lib; {
|
|
||||||
description = "Scientific python development environment";
|
|
||||||
longDescription = ''
|
|
||||||
Spyder (previously known as Pydee) is a powerful interactive development
|
|
||||||
environment for the Python language with advanced editing, interactive
|
|
||||||
testing, debugging and introspection features.
|
|
||||||
'';
|
|
||||||
homepage = "https://www.spyder-ide.org/";
|
|
||||||
downloadPage = "https://github.com/spyder-ide/spyder/releases";
|
|
||||||
changelog = "https://github.com/spyder-ide/spyder/blob/master/CHANGELOG.md";
|
|
||||||
license = licenses.mit;
|
|
||||||
platforms = platforms.linux;
|
|
||||||
maintainers = with maintainers; [ gebner ];
|
|
||||||
};
|
|
||||||
}
|
|
Loading…
Reference in New Issue