Merge master into haskell-updates

This commit is contained in:
github-actions[bot] 2021-09-23 00:06:56 +00:00 committed by GitHub
commit 69efe64153
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
239 changed files with 3793 additions and 1760 deletions

5
.github/CODEOWNERS vendored
View file

@ -231,3 +231,8 @@
# Cinnamon
/pkgs/desktops/cinnamon @mkg20001
#nim
/pkgs/development/compilers/nim @ehmry
/pkgs/development/nim-packages @ehmry
/pkgs/top-level/nim-packages.nix @ehmry

6
.github/labeler.yml vendored
View file

@ -72,6 +72,12 @@
- nixos/**/*
- pkgs/os-specific/linux/nixos-rebuild/**/*
"6.topic: nim":
- doc/languages-frameworks/nim.section.md
- pkgs/development/compilers/nim/*
- pkgs/development/nim-packages/**/*
- pkgs/top-level/nim-packages.nix
"6.topic: ocaml":
- doc/languages-frameworks/ocaml.section.md
- pkgs/development/compilers/ocaml/**/*

View file

@ -23,6 +23,7 @@
<xi:include href="javascript.section.xml" />
<xi:include href="lua.section.xml" />
<xi:include href="maven.section.xml" />
<xi:include href="nim.section.xml" />
<xi:include href="ocaml.section.xml" />
<xi:include href="octave.section.xml" />
<xi:include href="perl.section.xml" />

View file

@ -0,0 +1,91 @@
# Nim {#nim}
## Overview {#nim-overview}
The Nim compiler, a builder function, and some packaged libraries are available
in Nixpkgs. Until now each compiler release has been effectively backwards
compatible so only the latest version is available.
## Nim program packages in Nixpkgs {#nim-program-packages-in-nixpkgs}
Nim programs can be built using `nimPackages.buildNimPackage`. In the
case of packages not containing exported library code the attribute
`nimBinOnly` should be set to `true`.
The following example shows a Nim program that depends only on Nim libraries:
```nix
{ lib, nimPackages, fetchurl }:
nimPackages.buildNimPackage rec {
pname = "hottext";
version = "1.4";
nimBinOnly = true;
src = fetchurl {
url = "https://git.sr.ht/~ehmry/hottext/archive/v${version}.tar.gz";
sha256 = "sha256-hIUofi81zowSMbt1lUsxCnVzfJGN3FEiTtN8CEFpwzY=";
};
buildInputs = with nimPackages; [
bumpy
chroma
flatty
nimsimd
pixie
sdl2
typography
vmath
zippy
];
}
```
## Nim library packages in Nixpkgs {#nim-library-packages-in-nixpkgs}
Nim libraries can also be built using `nimPackages.buildNimPackage`, but
often the product of a fetcher is sufficient to satisfy a dependency.
The `fetchgit`, `fetchFromGitHub`, and `fetchNimble` functions yield an
output that can be discovered during the `configurePhase` of `buildNimPackage`.
Nim library packages are listed in
[pkgs/top-level/nim-packages.nix](https://github.com/NixOS/nixpkgs/blob/master/pkgs/top-level/nim-packages.nix) and implemented at
[pkgs/development/nim-packages](https://github.com/NixOS/nixpkgs/tree/master/pkgs/development/nim-packages).
The following example shows a Nim library that propagates a dependency on a
non-Nim package:
```nix
{ lib, buildNimPackage, fetchNimble, SDL2 }:
buildNimPackage rec {
pname = "sdl2";
version = "2.0.4";
src = fetchNimble {
inherit pname version;
hash = "sha256-Vtcj8goI4zZPQs2TbFoBFlcR5UqDtOldaXSH/+/xULk=";
};
propagatedBuildInputs = [ SDL2 ];
}
```
## `buildNimPackage` parameters {#buildnimpackage-parameters}
All parameters from `stdenv.mkDerivation` function are still supported. The
following are specific to `buildNimPackage`:
* `nimBinOnly ? false`: If `true` then build only the programs listed in
the Nimble file in the packages sources.
* `nimbleFile`: Specify the Nimble file location of the package being built
rather than discover the file at build-time.
* `nimRelease ? true`: Build the package in *release* mode.
* `nimDefines ? []`: A list of Nim defines. Key-value tuples are not supported.
* `nimFlags ? []`: A list of command line arguments to pass to the Nim compiler.
Use this to specify defines with arguments in the form of `-d:${name}=${value}`.
* `nimDoc` ? false`: Build and install HTML documentation.
* `buildInputs` ? []: The packages listed here will be searched for `*.nimble`
files which are used to populate the Nim library path. Otherwise the standard
behavior is in effect.

View file

@ -116,22 +116,44 @@ is updated after every change to `Cargo.lock`. Therefore,
a `Cargo.lock` file using the `cargoLock` argument. For example:
```nix
rustPlatform.buildRustPackage rec {
rustPlatform.buildRustPackage {
pname = "myproject";
version = "1.0.0";
cargoLock = {
lockFile = ./Cargo.lock;
}
};
# ...
}
```
This will retrieve the dependencies using fixed-output derivations from
the specified lockfile. Note that setting `cargoLock.lockFile` doesn't
add a `Cargo.lock` to your `src`, and a `Cargo.lock` is still required
to build a rust package. A simple fix is to use:
the specified lockfile.
One caveat is that `Cargo.lock` cannot be patched in the `patchPhase`
because it runs after the dependencies have already been fetched. If
you need to patch or generate the lockfile you can alternatively set
`cargoLock.lockFileContents` to a string of its contents:
```nix
rustPlatform.buildRustPackage {
pname = "myproject";
version = "1.0.0";
cargoLock = let
fixupLockFile = path: f (builtins.readFile path);
in {
lockFileContents = fixupLockFile ./Cargo.lock;
};
# ...
}
```
Note that setting `cargoLock.lockFile` or `cargoLock.lockFileContents`
doesn't add a `Cargo.lock` to your `src`, and a `Cargo.lock` is still
required to build a rust package. A simple fix is to use:
```nix
postPatch = ''

View file

@ -2743,6 +2743,12 @@
githubId = 40633781;
name = "Sergei S.";
};
dit7ya = {
email = "7rat13@gmail.com";
github = "dit7ya";
githubId = 14034137;
name = "Mostly Void";
};
dizfer = {
email = "david@izquierdofernandez.com";
github = "dizfer";
@ -5189,6 +5195,12 @@
githubId = 9866621;
name = "Jack";
};
jkarlson = {
email = "jekarlson@gmail.com";
github = "jkarlson";
githubId = 1204734;
name = "Emil Karlson";
};
jlesquembre = {
email = "jl@lafuente.me";
github = "jlesquembre";
@ -7667,6 +7679,12 @@
githubId = 6455574;
name = "Matt Votava";
};
mvs = {
email = "mvs@nya.yt";
github = "illdefined";
githubId = 772914;
name = "Mikael Voss";
};
maxwilson = {
email = "nixpkgs@maxwilson.dev";
github = "mwilsoncoding";

View file

@ -84,7 +84,7 @@ in {
type = types.package;
default = pkgs.krb5Full;
defaultText = "pkgs.krb5Full";
example = literalExample "pkgs.heimdalFull";
example = literalExample "pkgs.heimdal";
description = ''
The Kerberos implementation that will be present in
<literal>environment.systemPackages</literal> after enabling this

View file

@ -141,8 +141,15 @@ in
// mkService cfg.atopgpu.enable "atopgpu" [ atop ];
timers = mkTimer cfg.atopRotateTimer.enable "atop-rotate" [ atop ];
};
security.wrappers =
lib.mkIf cfg.setuidWrapper.enable { atop = { source = "${atop}/bin/atop"; }; };
security.wrappers = lib.mkIf cfg.setuidWrapper.enable {
atop =
{ setuid = true;
owner = "root";
group = "root";
source = "${atop}/bin/atop";
};
};
}
);
}

View file

@ -30,7 +30,7 @@ in
###### implementation
config = mkIf cfg.enable {
environment.variables.XDG_DATA_DIRS = [ "${pkgs.plotinus}/share/gsettings-schemas/${pkgs.plotinus.name}" ];
environment.sessionVariables.XDG_DATA_DIRS = [ "${pkgs.plotinus}/share/gsettings-schemas/${pkgs.plotinus.name}" ];
environment.variables.GTK3_MODULES = [ "${pkgs.plotinus}/lib/libplotinus.so" ];
};
}

View file

@ -5,28 +5,33 @@ with lib;
let
cfg = config.services.kubernetes;
defaultContainerdConfigFile = pkgs.writeText "containerd.toml" ''
version = 2
root = "/var/lib/containerd"
state = "/run/containerd"
oom_score = 0
defaultContainerdSettings = {
version = 2;
root = "/var/lib/containerd";
state = "/run/containerd";
oom_score = 0;
[grpc]
address = "/run/containerd/containerd.sock"
grpc = {
address = "/run/containerd/containerd.sock";
};
[plugins."io.containerd.grpc.v1.cri"]
sandbox_image = "pause:latest"
plugins."io.containerd.grpc.v1.cri" = {
sandbox_image = "pause:latest";
[plugins."io.containerd.grpc.v1.cri".cni]
bin_dir = "/opt/cni/bin"
max_conf_num = 0
cni = {
bin_dir = "/opt/cni/bin";
max_conf_num = 0;
};
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc]
runtime_type = "io.containerd.runc.v2"
containerd.runtimes.runc = {
runtime_type = "io.containerd.runc.v2";
};
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes."io.containerd.runc.v2".options]
SystemdCgroup = true
'';
containerd.runtimes."io.containerd.runc.v2".options = {
SystemdCgroup = true;
};
};
};
mkKubeConfig = name: conf: pkgs.writeText "${name}-kubeconfig" (builtins.toJSON {
apiVersion = "v1";
@ -248,7 +253,7 @@ in {
(mkIf cfg.kubelet.enable {
virtualisation.containerd = {
enable = mkDefault true;
configFile = mkDefault defaultContainerdConfigFile;
settings = mkDefault defaultContainerdSettings;
};
})

View file

@ -111,7 +111,7 @@ in {
};
services.mail.sendmailSetuidWrapper = mkIf cfg.setSendmail
security.wrappers.smtpctl // { program = "sendmail"; };
(security.wrappers.smtpctl // { program = "sendmail"; });
systemd.tmpfiles.rules = [
"d /var/spool/smtpd 711 root - - -"

View file

@ -26,12 +26,16 @@ in
config = mkIf cfg.enable {
environment.systemPackages = [ pkgs.safeeyes ];
systemd.user.services.safeeyes = {
description = "Safeeyes";
wantedBy = [ "graphical-session.target" ];
partOf = [ "graphical-session.target" ];
path = [ pkgs.alsa-utils ];
startLimitIntervalSec = 350;
startLimitBurst = 10;
serviceConfig = {

View file

@ -217,6 +217,7 @@ in {
home = "${dataDir}";
createHome = true;
isSystemUser = true;
group = "dnscrypt-wrapper";
};
users.groups.dnscrypt-wrapper = { };

View file

@ -164,7 +164,7 @@ in {
path = [ pkgs.iptables ];
preStart = optionalString (cfg.storageBackend == "etcd") ''
echo "setting network configuration"
until ${pkgs.etcdctl}/bin/etcdctl set /coreos.com/network/config '${builtins.toJSON networkConfig}'
until ${pkgs.etcd}/bin/etcdctl set /coreos.com/network/config '${builtins.toJSON networkConfig}'
do
echo "setting network configuration, retry"
sleep 1

View file

@ -8,7 +8,7 @@ let
in
{
meta.maintainers = with maintainers; [ filalex77 ];
meta.maintainers = with maintainers; [ Br1ght0ne ];
###### interface

View file

@ -27,7 +27,7 @@ in
{
# No documentation about correct triggers, so guessing at them.
config = mkIf (cfg.enable && kerberos == pkgs.heimdalFull) {
config = mkIf (cfg.enable && kerberos == pkgs.heimdal) {
systemd.services.kadmind = {
description = "Kerberos Administration Daemon";
wantedBy = [ "multi-user.target" ];

View file

@ -223,7 +223,6 @@ in
krb5 = discoverTests (import ./krb5 {});
ksm = handleTest ./ksm.nix {};
kubernetes = handleTestOn ["x86_64-linux"] ./kubernetes {};
latestKernel.hardened = handleTest ./hardened.nix { latestKernel = true; };
latestKernel.login = handleTest ./login.nix { latestKernel = true; };
leaps = handleTest ./leaps.nix {};
libreddit = handleTest ./libreddit.nix {};

View file

@ -105,8 +105,6 @@ let assertions = rec {
};
in
{
name = "atop";
justThePackage = makeTest {
name = "atop-justThePackage";
machine = {

View file

@ -9,7 +9,7 @@ let
makeTest {
name = "cntr-${backend}";
meta = { maintainers = with lib.maintainers; [ srk mic92 ]; };
meta = { maintainers = with lib.maintainers; [ sorki mic92 ]; };
nodes = {
${backend} = { pkgs, ... }: {

View file

@ -24,6 +24,11 @@ let
ln -s vda1 /dev/xvda1
'';
# In a NixOS test the serial console is occupied by the "backdoor"
# (see testing/test-instrumentation.nix) and is incompatible with
# the configuration in virtualisation/amazon-image.nix.
systemd.services."serial-getty@ttyS0".enable = mkForce false;
# Needed by nixos-rebuild due to the lack of network
# access. Determined by trial and error.
system.extraDependencies = with pkgs; ( [

View file

@ -11,8 +11,8 @@ import ./make-test-python.nix ({ pkgs, ...} :
imports = [ ./common/user-account.nix ];
services.xserver.enable = true;
services.xserver.desktopManager.enlightenment.enable = true;
services.xserver.displayManager.lightdm = {
enable = true;
services.xserver.displayManager = {
lightdm.enable = true;
autoLogin = {
enable = true;
user = "alice";

View file

@ -1,4 +1,4 @@
import ./make-test-python.nix ({ pkgs, latestKernel ? false, ... } : {
import ./make-test-python.nix ({ pkgs, ... } : {
name = "hardened";
meta = with pkgs.lib.maintainers; {
maintainers = [ joachifm ];
@ -10,8 +10,6 @@ import ./make-test-python.nix ({ pkgs, latestKernel ? false, ... } : {
{ users.users.alice = { isNormalUser = true; extraGroups = [ "proc" ]; };
users.users.sybil = { isNormalUser = true; group = "wheel"; };
imports = [ ../modules/profiles/hardened.nix ];
boot.kernelPackages =
lib.mkIf latestKernel pkgs.linuxPackages_latest_hardened;
environment.memoryAllocator.provider = "graphene-hardened";
nix.useSandbox = false;
virtualisation.emptyDiskImages = [ 4096 ];

View file

@ -9,7 +9,7 @@ import ../make-test-python.nix ({pkgs, ...}: {
};
krb5 = {
enable = true;
kerberos = pkgs.heimdalFull;
kerberos = pkgs.heimdal;
libdefaults = {
default_realm = "FOO.BAR";
};

View file

@ -10,7 +10,7 @@ import ./make-test-python.nix ({ pkgs, lib, ... }:
'';
in {
name = "meilisearch";
meta.maintainers = with lib.maintainers; [ filalex77 ];
meta.maintainers = with lib.maintainers; [ Br1ght0ne ];
machine = { ... }: {
environment.systemPackages = with pkgs; [ curl jq ];

View file

@ -28,7 +28,10 @@ in {
machine = { pkgs, ... }: {
services.minio = {
enable = true;
inherit accessKey secretKey;
rootCredentialsFile = pkgs.writeText "minio-credentials" ''
MINIO_ROOT_USER=${accessKey}
MINIO_ROOT_PASSWORD=${secretKey}
'';
};
environment.systemPackages = [ pkgs.minio-client ];

View file

@ -14,7 +14,7 @@ in
{
environment.systemPackages = [
pkgs.curl
(pkgs.mpv-with-scripts.override {
(pkgs.wrapMpv pkgs.mpv-unwrapped {
scripts = [ pkgs.mpvScripts.simple-mpv-webui ];
})
];

View file

@ -4,6 +4,16 @@ let
mysqlenv-common = pkgs.buildEnv { name = "mysql-path-env-common"; pathsToLink = [ "/bin" ]; paths = with pkgs; [ bash gawk gnutar inetutils which ]; };
mysqlenv-mariabackup = pkgs.buildEnv { name = "mysql-path-env-mariabackup"; pathsToLink = [ "/bin" ]; paths = with pkgs; [ gzip iproute2 netcat procps pv socat ]; };
# Common user configuration
users = { ... }:
{
users.users.testuser = {
isSystemUser = true;
group = "testusers";
};
users.groups.testusers = { };
};
in {
name = "mariadb-galera-mariabackup";
meta = with pkgs.lib.maintainers; {
@ -17,6 +27,7 @@ in {
galera_01 =
{ pkgs, ... }:
{
imports = [ users ];
networking = {
interfaces.eth1 = {
ipv4.addresses = [
@ -31,7 +42,6 @@ in {
firewall.allowedTCPPorts = [ 3306 4444 4567 4568 ];
firewall.allowedUDPPorts = [ 4567 ];
};
users.users.testuser = { isSystemUser = true; };
systemd.services.mysql = with pkgs; {
path = [ mysqlenv-common mysqlenv-mariabackup ];
};
@ -75,6 +85,7 @@ in {
galera_02 =
{ pkgs, ... }:
{
imports = [ users ];
networking = {
interfaces.eth1 = {
ipv4.addresses = [
@ -89,7 +100,6 @@ in {
firewall.allowedTCPPorts = [ 3306 4444 4567 4568 ];
firewall.allowedUDPPorts = [ 4567 ];
};
users.users.testuser = { isSystemUser = true; };
systemd.services.mysql = with pkgs; {
path = [ mysqlenv-common mysqlenv-mariabackup ];
};
@ -122,6 +132,7 @@ in {
galera_03 =
{ pkgs, ... }:
{
imports = [ users ];
networking = {
interfaces.eth1 = {
ipv4.addresses = [
@ -136,7 +147,6 @@ in {
firewall.allowedTCPPorts = [ 3306 4444 4567 4568 ];
firewall.allowedUDPPorts = [ 4567 ];
};
users.users.testuser = { isSystemUser = true; };
systemd.services.mysql = with pkgs; {
path = [ mysqlenv-common mysqlenv-mariabackup ];
};

View file

@ -4,6 +4,16 @@ let
mysqlenv-common = pkgs.buildEnv { name = "mysql-path-env-common"; pathsToLink = [ "/bin" ]; paths = with pkgs; [ bash gawk gnutar inetutils which ]; };
mysqlenv-rsync = pkgs.buildEnv { name = "mysql-path-env-rsync"; pathsToLink = [ "/bin" ]; paths = with pkgs; [ lsof procps rsync stunnel ]; };
# Common user configuration
users = { ... }:
{
users.users.testuser = {
isSystemUser = true;
group = "testusers";
};
users.groups.testusers = { };
};
in {
name = "mariadb-galera-rsync";
meta = with pkgs.lib.maintainers; {
@ -17,6 +27,7 @@ in {
galera_04 =
{ pkgs, ... }:
{
imports = [ users ];
networking = {
interfaces.eth1 = {
ipv4.addresses = [
@ -31,7 +42,6 @@ in {
firewall.allowedTCPPorts = [ 3306 4444 4567 4568 ];
firewall.allowedUDPPorts = [ 4567 ];
};
users.users.testuser = { isSystemUser = true; };
systemd.services.mysql = with pkgs; {
path = [ mysqlenv-common mysqlenv-rsync ];
};
@ -70,6 +80,7 @@ in {
galera_05 =
{ pkgs, ... }:
{
imports = [ users ];
networking = {
interfaces.eth1 = {
ipv4.addresses = [
@ -84,7 +95,6 @@ in {
firewall.allowedTCPPorts = [ 3306 4444 4567 4568 ];
firewall.allowedUDPPorts = [ 4567 ];
};
users.users.testuser = { isSystemUser = true; };
systemd.services.mysql = with pkgs; {
path = [ mysqlenv-common mysqlenv-rsync ];
};
@ -116,6 +126,7 @@ in {
galera_06 =
{ pkgs, ... }:
{
imports = [ users ];
networking = {
interfaces.eth1 = {
ipv4.addresses = [
@ -130,7 +141,6 @@ in {
firewall.allowedTCPPorts = [ 3306 4444 4567 4568 ];
firewall.allowedUDPPorts = [ 4567 ];
};
users.users.testuser = { isSystemUser = true; };
systemd.services.mysql = with pkgs; {
path = [ mysqlenv-common mysqlenv-rsync ];
};

View file

@ -1,4 +1,26 @@
import ./../make-test-python.nix ({ pkgs, ...} : {
import ./../make-test-python.nix ({ pkgs, ...}:
let
# Setup common users
users = { ... }:
{
users.groups.testusers = { };
users.users.testuser = {
isSystemUser = true;
group = "testusers";
};
users.users.testuser2 = {
isSystemUser = true;
group = "testusers";
};
};
in
{
name = "mysql";
meta = with pkgs.lib.maintainers; {
maintainers = [ eelco shlevy ];
@ -9,8 +31,8 @@ import ./../make-test-python.nix ({ pkgs, ...} : {
{ pkgs, ... }:
{
users.users.testuser = { isSystemUser = true; };
users.users.testuser2 = { isSystemUser = true; };
imports = [ users ];
services.mysql.enable = true;
services.mysql.initialDatabases = [
{ name = "testdb3"; schema = ./testdb.sql; }
@ -40,12 +62,12 @@ import ./../make-test-python.nix ({ pkgs, ...} : {
{ pkgs, ... }:
{
imports = [ users ];
# prevent oom:
# Kernel panic - not syncing: Out of memory: compulsory panic_on_oom is enabled
virtualisation.memorySize = 1024;
users.users.testuser = { isSystemUser = true; };
users.users.testuser2 = { isSystemUser = true; };
services.mysql.enable = true;
services.mysql.initialDatabases = [
{ name = "testdb3"; schema = ./testdb.sql; }
@ -75,8 +97,8 @@ import ./../make-test-python.nix ({ pkgs, ...} : {
{ pkgs, ... }:
{
users.users.testuser = { isSystemUser = true; };
users.users.testuser2 = { isSystemUser = true; };
imports = [ users ];
services.mysql.enable = true;
services.mysql.initialScript = pkgs.writeText "mariadb-init.sql" ''
ALTER USER root@localhost IDENTIFIED WITH unix_socket;

View file

@ -1,4 +1,4 @@
import ./make-test-python.nix ({ pkgs, ...} :
import ./make-test-python.nix ({ pkgs, lib, ...} :
{
name = "pantheon";

View file

@ -1,6 +1,6 @@
import ./make-test-python.nix ({ pkgs, ...} : {
name = "postfixadmin";
meta = with pkgs.stdenv.lib.maintainers; {
meta = with pkgs.lib.maintainers; {
maintainers = [ globin ];
};

View file

@ -554,7 +554,11 @@ let
WorkingDirectory = "/var/spool/mail";
};
};
users.users.mailexporter.isSystemUser = true;
users.users.mailexporter = {
isSystemUser = true;
group = "mailexporter";
};
users.groups.mailexporter = {};
};
exporterTest = ''
wait_for_unit("postfix.service")

View file

@ -42,6 +42,8 @@ import ./make-test-python.nix ({pkgs, ...}: {
# DO NOT COPY THIS TO PRODUCTION AS IS. Think about it at least twice.
# Everyone on the "isp" machine will be able to add routes to the kernel.
security.wrappers.add-dhcpd-lease = {
owner = "root";
group = "root";
source = pkgs.writeShellScript "add-dhcpd-lease" ''
exec ${pkgs.iproute2}/bin/ip -6 route replace "$1" via "$2"
'';

View file

@ -6,7 +6,7 @@
with import ../lib/testing-python.nix { inherit system pkgs; };
makeTest {
name = "tigervnc";
meta = with pkgs.stdenv.lib.maintainers; {
meta = with pkgs.lib.maintainers; {
maintainers = [ lheckemann ];
};

View file

@ -14,7 +14,7 @@ import ./make-test-python.nix ({ pkgs, ... }: {
port = 18332;
};
};
services.bitcoind = {
services.bitcoind."testnet" = {
enable = true;
testnet = true;
rpc.users = {

View file

@ -13,13 +13,13 @@
mkDerivation rec {
pname = "ptcollab";
version = "0.4.2";
version = "0.4.3";
src = fetchFromGitHub {
owner = "yuxshao";
repo = "ptcollab";
rev = "v${version}";
sha256 = "sha256-AeIjc+FoFsTcyWl261GvyySIHP107rL4JkuMXFhnPbk=";
sha256 = "sha256-bFFWPl7yaTwCKz7/f9Vk6mg0roUnig0dFERS4IE4R7g=";
};
nativeBuildInputs = [ qmake pkg-config ];

View file

@ -2,24 +2,30 @@
, rustPlatform
, fetchFromGitHub
, llvmPackages
, rocksdb
}:
rustPlatform.buildRustPackage rec {
pname = "electrs";
version = "0.8.11";
version = "0.8.12";
src = fetchFromGitHub {
owner = "romanz";
repo = pname;
rev = "v${version}";
sha256 = "024sdyvrx7s4inldamq4c8lv0iijjyd18j1mm9x6xf2clmvicaa6";
sha256 = "0kd5zki9f1pnwscnvd921dw0lc45nfkwk23l33nzdjn005lmsw7v";
};
cargoSha256 = "1l8dwjwj21crxampzj5c0k98xnisgy3d9c3dkgf5vaybrcp04k85";
# needed for librocksdb-sys
nativeBuildInputs = [ llvmPackages.clang ];
LIBCLANG_PATH = "${llvmPackages.libclang.lib}/lib";
cargoSha256 = "0yl50ryxidbs9wkabz919mgbmsgsqjp1bjw792l1lkgncq8z9r5b";
# link rocksdb dynamically
ROCKSDB_INCLUDE_DIR = "${rocksdb}/include";
ROCKSDB_LIB_DIR = "${rocksdb}/lib";
cargoBuildFlags = "--no-default-features";
meta = with lib; {
description = "An efficient re-implementation of Electrum Server in Rust";

View file

@ -2,12 +2,12 @@
let
pname = "ledger-live-desktop";
version = "2.32.2";
version = "2.33.1";
name = "${pname}-${version}";
src = fetchurl {
url = "https://github.com/LedgerHQ/${pname}/releases/download/v${version}/${pname}-${version}-linux-x86_64.AppImage";
sha256 = "14agkl6xf0f9s5qldla6p6kzl8zlx61q5m8qy63lq215hrzh9d50";
sha256 = "1k1h37fbpsib9h8867m2dsfacdjs78gdm61gvrin5gpw1zj10syz";
};
appimageContents = appimageTools.extractType2 {

View file

@ -8,7 +8,7 @@
let
pname = "trezor-suite";
version = "21.7.1";
version = "21.9.2";
name = "${pname}-${version}";
suffix = {
@ -18,10 +18,9 @@ let
src = fetchurl {
url = "https://github.com/trezor/${pname}/releases/download/v${version}/Trezor-Suite-${version}-${suffix}.AppImage";
# sha512 hashes are obtained from latest-linux-arm64.yml and latest-linux.yml
sha512 = {
aarch64-linux = "sha512-GEu1Zx3IQws8wsVsZUaIKvC0kTe8l/BBPSdu5q44tDpszmPugz8G/8FDAO/Ra50dzyiHhRheybZPuf2BBGGb7A==";
x86_64-linux = "sha512-ghPbQa/MstzfUOWve1KNwB1t9dxK0+eYunBSoShWKpb85hgK69+ncTmhY8HejT28OkjFnGk6h4PWbrnQetj8MA==";
sha512 = { # curl -Lfs https://github.com/trezor/trezor-suite/releases/latest/download/latest-linux{-arm64,}.yml | rg ^sha512 | sed 's/: /-/'
aarch64-linux = "sha512-mgip818sGkrKwF4v2mj/JeTNxBoj7DgdNPoxZ8sp8OvojHB2sa0hm4YXfrzAdPf8CP6d5ChUmwccQyYilGUiOQ==";
x86_64-linux = "sha512-f02m8Q6ITYhIXH1FS2BA/QYYsdtxklDDNYBXBarj8b1kA+yhDFZ3VL9vy+nZNdPQHQ2yMQreDzpcToXBQ67XyQ==";
}.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
};

View file

@ -1,12 +1,12 @@
{ lib, stdenv, fetchurl, dee, gtk2, intltool, libdbusmenu-gtk2, libunity, pkg-config, rsync }:
{ lib, stdenv, fetchurl, dee, gtk3, intltool, libdbusmenu-gtk3, libunity, pkg-config, rsync }:
stdenv.mkDerivation rec {
version = "1.2.8";
version = "1.3.0";
pname = "grsync";
src = fetchurl {
url = "mirror://sourceforge/grsync/grsync-${version}.tar.gz";
sha256 = "1c86jch73cy7ig9k4shvcd3jnaxk7jppfcr8nmkz8gbylsn5zsll";
sha256 = "sha256-t8fGpi4FMC2DF8OHQefXHvmrRjnuW/8mIqODsgQ6Nfw=";
};
nativeBuildInputs = [
@ -16,8 +16,8 @@ stdenv.mkDerivation rec {
buildInputs = [
dee
gtk2
libdbusmenu-gtk2
gtk3
libdbusmenu-gtk3
libunity
rsync
];

View file

@ -57,6 +57,9 @@ in buildPythonApplication rec {
# safeeyes images
--prefix XDG_DATA_DIRS : "$out/lib/${python.libPrefix}/site-packages/usr/share"
)
mkdir -p $out/share/applications
cp -r safeeyes/platform/icons $out/share/
cp safeeyes/platform/safeeyes.desktop $out/share/applications/
'';
doCheck = false; # no tests

View file

@ -2,13 +2,13 @@
python3Packages.buildPythonApplication rec {
pname = "skytemple";
version = "1.3.0";
version = "1.3.1";
src = fetchFromGitHub {
owner = "SkyTemple";
repo = pname;
rev = version;
sha256 = "03qmjp257rk4p1zkz89cv26awdgngvakqyg6jc3g6xrhmsvr4r2p";
sha256 = "13vvsp47frgq5c2wfllkg4lmsy5vxl53j5rw9c84d5xix5bisk1n";
};
buildInputs = [
@ -41,6 +41,6 @@ python3Packages.buildPythonApplication rec {
homepage = "https://github.com/SkyTemple/skytemple";
description = "ROM hacking tool for Pokémon Mystery Dungeon Explorers of Sky";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ xfix ];
maintainers = with maintainers; [ xfix marius851000 ];
};
}

View file

@ -14,13 +14,13 @@ let
]);
in stdenv.mkDerivation rec {
pname = "wike";
version = "1.5.6";
version = "1.5.7";
src = fetchFromGitHub {
owner = "hugolabe";
repo = "Wike";
rev = version;
sha256 = "1qnxzxqjj0sn522k15plskwa7nlhhbcipfc3w17fbq3k2zhpr1yy";
sha256 = "sha256-SB+ApuSovqQCaZYPhH+duf+c07JDSSCRz8hTVhEa4gY=";
};
nativeBuildInputs = [

View file

@ -20,17 +20,17 @@
mkDerivation rec {
pname = "angelfish";
version = "21.06";
version = "21.08";
src = fetchurl {
url = "mirror://kde/stable/plasma-mobile/${version}/angelfish-${version}.tar.xz";
sha256 = "sha256-iHgmG/DeaUPnRXlVIU8P/oUcYINienYmR2zI9Q4Yd3s=";
sha256 = "1gzvlha159bw767mj8lisn89592j4j4dazzfws3v4anddjh60xnh";
};
cargoDeps = rustPlatform.fetchCargoTarball {
inherit src;
name = "${pname}-${version}";
sha256 = "0zh0kli7kav18v9znq2f5jklhf3m1kyb41jzmivjx70g9xyfzlwk";
sha256 = "1pbvw9hdzn3i97mahdy9y6jnjsmwmjs3lxfz7q6r9r10i8swbkak";
};
nativeBuildInputs = [
@ -63,7 +63,7 @@ mkDerivation rec {
meta = with lib; {
description = "Web browser for Plasma Mobile";
homepage = "https://apps.kde.org/en/mobile.angelfish";
homepage = "https://invent.kde.org/plasma-mobile/angelfish";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ dotlambda ];
};

View file

@ -2,13 +2,13 @@
mkYarnPackage rec {
pname = "vieb";
version = "6.0.0";
version = "6.1.0";
src = fetchFromGitHub {
owner = "Jelmerro";
repo = pname;
rev = version;
sha256 = "sha256-3mX6z/CRUQdyQxYK50yqCZIrhPgitsyus4oLkbPqNvM=";
sha256 = "sha256-MJJeHnwfXouBygRT/wFWFMRHxQVf/3k2c7vp/tkD5co=";
};
packageJSON = ./package.json;

View file

@ -2,13 +2,13 @@
buildGoModule rec {
pname = "cloudflared";
version = "2021.9.0";
version = "2021.9.1";
src = fetchFromGitHub {
owner = "cloudflare";
repo = "cloudflared";
rev = version;
sha256 = "sha256-djgMTCDIVcaPI6to/pPN2hPi1tsKPxRCT30EL0OOEQU=";
sha256 = "sha256-VekJq7d80hD8AybkpLq4+9yeeBkeLATr2iG5OFU/TFs=";
};
vendorSha256 = null;

View file

@ -2,24 +2,25 @@
let
version = "0.17.2";
sha256 = "0kcdx4ldnshk4pqq37a7p08xr5cpsjrbrifk9fc3jbiw39m09mhf";
manifestsSha256 = "1v6md4xh4sq1vmb5a8qvb66l101fq75lmv2s4j2z3walssb5mmgj";
manifests = fetchzip {
url = "https://github.com/fluxcd/flux2/releases/download/v${version}/manifests.tar.gz";
sha256 = "1v6md4xh4sq1vmb5a8qvb66l101fq75lmv2s4j2z3walssb5mmgj";
sha256 = manifestsSha256;
stripRoot = false;
};
in
buildGoModule rec {
inherit version;
pname = "fluxcd";
inherit version;
src = fetchFromGitHub {
owner = "fluxcd";
repo = "flux2";
rev = "v${version}";
sha256 = "0kcdx4ldnshk4pqq37a7p08xr5cpsjrbrifk9fc3jbiw39m09mhf";
inherit sha256;
};
vendorSha256 = "sha256-glifJ0V3RwS7E6EWZsCa88m0MK883RhPSXCsAmMggVs=";
@ -50,6 +51,8 @@ buildGoModule rec {
done
'';
passthru.updateScript = ./update.sh;
meta = with lib; {
description = "Open and extensible continuous delivery solution for Kubernetes";
longDescription = ''

View file

@ -0,0 +1,31 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl gnugrep gnused jq
set -eu -o pipefail
cd $(dirname "${BASH_SOURCE[0]}")
TAG=$(curl ${GITHUB_TOKEN:+" -u \":$GITHUB_TOKEN\""} --silent https://api.github.com/repos/fluxcd/flux2/releases/latest | jq -r '.tag_name')
VERSION=$(echo ${TAG} | sed 's/^v//')
SHA256=$(nix-prefetch-url --quiet --unpack https://github.com/fluxcd/flux2/archive/refs/tags/${TAG}.tar.gz)
SPEC_SHA256=$(nix-prefetch-url --quiet --unpack https://github.com/fluxcd/flux2/releases/download/${TAG}/manifests.tar.gz)
setKV () {
sed -i "s/$1 = \".*\"/$1 = \"$2\"/" ./default.nix
}
setKV version ${VERSION}
setKV sha256 ${SHA256}
setKV manifestsSha256 ${SPEC_SHA256}
setKV vendorSha256 ""
cd ../../../../../
set +e
VENDOR_SHA256=$(nix-build --no-out-link -A fluxcd 2>&1 | grep "got:" | cut -d':' -f2 | sed 's/ //g')
set -e
cd - > /dev/null
setKV vendorSha256 ${VENDOR_SHA256}

View file

@ -45,10 +45,16 @@ with lib;
let
k3sVersion = "1.21.4+k3s1"; # k3s git tag
k3sCommit = "3e250fdbab72d88f7e6aae57446023a0567ffc97"; # k3s git commit at the above version
k3sRepoSha256 = "1w7drvk0bmlmqrxh1y6dxjy7dk6bdrl72pkd25lc1ir6wbzb05h9";
traefikChartVersion = "9.18.2"; # taken from ./scripts/download at TRAEFIK_VERSION
traefikChartSha256 = "sha256-9d7p0ngyMN27u4OPgz7yI14Zj9y36t9o/HMX5wyDpUI=";
k3sRootVersion = "0.9.1"; # taken from ./scripts/download at ROOT_VERSION
k3sRootSha256 = "sha256-qI84KYJKY/T6pqWZW9lOTq5NzZiu//v1zrMzUCiRTGQ=";
k3sCNIVersion = "0.8.6-k3s1"; # taken from ./scripts/version.sh at VERSION_CNIPLUGINS
k3sCNISha256 = "sha256-uAy17eRRAXPCcnh481KxFMvFQecnnBs24jn5YnVNfY4=";
baseMeta = {
description = "A lightweight Kubernetes distribution";
@ -61,7 +67,7 @@ let
# bundled into the k3s binary
traefikChart = fetchurl {
url = "https://helm.traefik.io/traefik/traefik-${traefikChartVersion}.tgz";
sha256 = "sha256-9d7p0ngyMN27u4OPgz7yI14Zj9y36t9o/HMX5wyDpUI=";
sha256 = traefikChartSha256;
};
# so, k3s is a complicated thing to package
# This derivation attempts to avoid including any random binaries from the
@ -75,7 +81,7 @@ let
k3sRoot = fetchzip {
# Note: marked as apache 2.0 license
url = "https://github.com/k3s-io/k3s-root/releases/download/v${k3sRootVersion}/k3s-root-amd64.tar";
sha256 = "sha256-qI84KYJKY/T6pqWZW9lOTq5NzZiu//v1zrMzUCiRTGQ=";
sha256 = k3sRootSha256;
stripRoot = false;
};
k3sPlugins = buildGoPackage rec {
@ -89,7 +95,7 @@ let
owner = "rancher";
repo = "plugins";
rev = "v${version}";
sha256 = "sha256-uAy17eRRAXPCcnh481KxFMvFQecnnBs24jn5YnVNfY4=";
sha256 = k3sCNISha256;
};
meta = baseMeta // {
@ -101,7 +107,7 @@ let
k3sRepo = fetchgit {
url = "https://github.com/k3s-io/k3s";
rev = "v${k3sVersion}";
sha256 = "1w7drvk0bmlmqrxh1y6dxjy7dk6bdrl72pkd25lc1ir6wbzb05h9";
sha256 = k3sRepoSha256;
};
# Stage 1 of the k3s build:
# Let's talk about how k3s is structured.
@ -280,5 +286,7 @@ stdenv.mkDerivation rec {
$out/bin/k3s --version | grep v${k3sVersion} > /dev/null
'';
passthru.updateScript = ./update.sh;
meta = baseMeta;
}

View file

@ -0,0 +1,62 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl gnugrep gnused jq
set -eu -o pipefail
WORKDIR=$(mktemp -d)
trap "rm -rf ${WORKDIR}" EXIT
cd $(dirname "${BASH_SOURCE[0]}")
LATEST_TAG_RAWFILE=${WORKDIR}/latest_tag.json
curl --silent ${GITHUB_TOKEN:+"-u \":$GITHUB_TOKEN\""} \
https://api.github.com/repos/k3s-io/k3s/releases/latest > ${LATEST_TAG_RAWFILE}
LATEST_TAG_NAME=$(jq -r '.tag_name' ${LATEST_TAG_RAWFILE})
K3S_VERSION=$(echo ${LATEST_TAG_NAME} | sed 's/^v//')
LATEST_TAG_TARBALL_URL=$(jq -r '.tarball_url' ${LATEST_TAG_RAWFILE})
K3S_COMMIT=$(curl --silent ${GITHUB_TOKEN:+"-u \":$GITHUB_TOKEN\""} \
https://api.github.com/repos/k3s-io/k3s/tags \
| jq -r "map(select(.name == \"${LATEST_TAG_NAME}\")) | .[0] | .commit.sha")
K3S_REPO_SHA256=$(nix-prefetch-url --quiet --unpack ${LATEST_TAG_TARBALL_URL})
FILE_SCRIPTS_DOWNLOAD=${WORKDIR}/scripts-download
curl --silent https://raw.githubusercontent.com/k3s-io/k3s/${K3S_COMMIT}/scripts/download > $FILE_SCRIPTS_DOWNLOAD
FILE_SCRIPTS_VERSION=${WORKDIR}/scripts-version.sh
curl --silent https://raw.githubusercontent.com/k3s-io/k3s/${K3S_COMMIT}/scripts/version.sh > $FILE_SCRIPTS_VERSION
TRAEFIK_CHART_VERSION=$(grep TRAEFIK_VERSION= $FILE_SCRIPTS_DOWNLOAD \
| cut -d'=' -f2 | cut -d' ' -f1)
TRAEFIK_CHART_SHA256=$(nix-prefetch-url --quiet "https://helm.traefik.io/traefik/traefik-${TRAEFIK_CHART_VERSION}.tgz")
K3S_ROOT_VERSION=$(grep ROOT_VERSION= $FILE_SCRIPTS_DOWNLOAD \
| cut -d'=' -f2 | cut -d' ' -f1 | sed 's/^v//')
K3S_ROOT_SHA256=$(nix-prefetch-url --quiet --unpack \
"https://github.com/k3s-io/k3s-root/releases/download/v${K3S_ROOT_VERSION}/k3s-root-amd64.tar")
CNIPLUGINS_VERSION=$(grep VERSION_CNIPLUGINS= $FILE_SCRIPTS_VERSION \
| cut -d'=' -f2 | cut -d' ' -f1 | sed -e 's/"//g' -e 's/^v//')
CNIPLUGINS_SHA256=$(nix-prefetch-url --quiet --unpack \
"https://github.com/rancher/plugins/archive/refs/tags/v${CNIPLUGINS_VERSION}.tar.gz")
setKV () {
sed -i "s/$1 = \".*\"/$1 = \"$2\"/" ./default.nix
}
setKV k3sVersion ${K3S_VERSION}
setKV k3sCommit ${K3S_COMMIT}
setKV k3sRepoSha256 ${K3S_REPO_SHA256}
setKV traefikChartVersion ${TRAEFIK_CHART_VERSION}
setKV traefikChartSha256 ${TRAEFIK_CHART_SHA256}
setKV k3sRootVersion ${K3S_ROOT_VERSION}
setKV k3sRootSha256 ${K3S_ROOT_SHA256}
setKV k3sCNIVersion ${CNIPLUGINS_VERSION}
setKV k3sCNISha256 ${CNIPLUGINS_SHA256}

View file

@ -20,13 +20,13 @@ let
"${electron}/bin/electron";
in nodePackages.deltachat-desktop.override rec {
pname = "deltachat-desktop";
version = "1.21.1";
version = "1.22.1";
src = fetchFromGitHub {
owner = "deltachat";
repo = "deltachat-desktop";
rev = "v${version}";
sha256 = "0d59z0mvi70i26d79s4h0sssclwcakidhvhq56zi78bkfqlx7xf1";
sha256 = "0wrwjblpw3f5ky697b2nhi9lisn4q5bl05086fdkx5v5j2ghz3n9";
};
nativeBuildInputs = [

View file

@ -1,6 +1,6 @@
{
"name": "deltachat-desktop",
"version": "1.21.1",
"version": "1.22.1",
"dependencies": {
"@blueprintjs/core": "^3.22.3",
"@mapbox/geojson-extent": "^1.0.0",

View file

@ -1,5 +1,4 @@
{ branch ? "stable", pkgs }:
# Generated by ./update-discord.sh
let
inherit (pkgs) callPackage fetchurl;
in {
@ -7,30 +6,30 @@ in {
pname = "discord";
binaryName = "Discord";
desktopName = "Discord";
version = "0.0.15";
version = "0.0.16";
src = fetchurl {
url = "https://dl.discordapp.net/apps/linux/${version}/discord-${version}.tar.gz";
sha256 = "0pn2qczim79hqk2limgh88fsn93sa8wvana74mpdk5n6x5afkvdd";
sha256 = "UTVKjs/i7C/m8141bXBsakQRFd/c//EmqqhKhkr1OOk=";
};
};
ptb = callPackage ./base.nix rec {
pname = "discord-ptb";
binaryName = "DiscordPTB";
desktopName = "Discord PTB";
version = "0.0.25";
version = "0.0.26";
src = fetchurl {
url = "https://dl-ptb.discordapp.net/apps/linux/${version}/discord-ptb-${version}.tar.gz";
sha256 = "082ygmsycicddpkv5s03vw3rjkrk4lgprq29z8b1hdjifvw93b21";
sha256 = "1rlj76yhxjwwfmdln3azjr69hvfx1bjqdg9jhdn4fp6mlirkrcq4";
};
};
canary = callPackage ./base.nix rec {
pname = "discord-canary";
binaryName = "DiscordCanary";
desktopName = "Discord Canary";
version = "0.0.130";
version = "0.0.131";
src = fetchurl {
url = "https://dl-canary.discordapp.net/apps/linux/${version}/discord-canary-${version}.tar.gz";
sha256 = "sha256-UamSiwjR68Pfm3uyHaI871VaGwIKJ5DShl8uE3rvX+U=";
sha256 = "087rzyivk0grhc73v7ldxxghks0n16ifrvpmk95vzaw99l9xv0v5";
};
};
}.${branch}

View file

@ -9,11 +9,11 @@ let
in stdenv.mkDerivation rec {
pname = "msmtp";
version = "1.8.15";
version = "1.8.16";
src = fetchurl {
url = "https://marlam.de/${pname}/releases/${pname}-${version}.tar.xz";
sha256 = "sha256-ImXcY56/Lt8waf/+CjvXZ0n4tY9AAdXN6uGYc5SQmc4=";
sha256 = "1n271yr83grpki9szdirnk6wb5rcc319f0gmfabyw3fzyf4msjy0";
};
patches = [

View file

@ -5,11 +5,11 @@ let
in
stdenv.mkDerivation rec {
pname = "super-productivity";
version = "7.2.1";
version = "7.5.1";
src = fetchurl {
url = "https://github.com/johannesjo/super-productivity/releases/download/v${version}/superProductivity-${version}.AppImage";
sha256 = "93eeb56fe923c48a9384cde0633e98a9d9dc5c0869fce63b9724ff74bb400049";
sha256 = "sha256-ezJN/t0iNk0haMLPioEQSNXU4ugVeJe44GNVGd+cOF4=";
name = "${pname}-${version}.AppImage";
};

View file

@ -0,0 +1,25 @@
{ lib, buildGoModule, fetchFromGitHub, pkg-config, pulseaudio }:
buildGoModule rec {
pname = "kappanhang";
version = "1.3";
src = fetchFromGitHub {
owner = "nonoo";
repo = pname;
rev = "v${version}";
sha256 = "1ycy8avq5s7zspfi0d9klqcwwkpmcaz742cigd7pmcnbbhspcicp";
};
nativeBuildInputs = [ pkg-config ];
buildInputs = [ pulseaudio ];
vendorSha256 = "1srjngcis42wfskwfqxxj101y9xyzrans1smy53bh1c9zm856xha";
meta = with lib; {
homepage = "https://github.com/nonoo/kappanhang";
description = "Remote control for Icom radio transceivers";
license = licenses.mit;
maintainers = with maintainers; [ mvs ];
};
}

View file

@ -14,11 +14,11 @@
mkDerivation rec {
pname = "kstars";
version = "3.5.4";
version = "3.5.5";
src = fetchurl {
url = "mirror://kde/stable/kstars/kstars-${version}.tar.xz";
sha256 = "sha256-JCdSYcogvoUmu+vB/vye+6ZMIJqVoScAKreh89dxoDU=";
sha256 = "sha256-cD31YFBnKvEPyBQils6qJxNKagDoIi8/Znfxj/Gsa0M=";
};
nativeBuildInputs = [ extra-cmake-modules kdoctools ];
@ -33,11 +33,6 @@ mkDerivation rec {
cfitsio indi-full xplanet libnova libraw gsl wcslib stellarsolver
];
# See https://bugs.kde.org/show_bug.cgi?id=439541
preConfigure = ''
rm po/de/docs/kstars/index.docbook
'';
cmakeFlags = [
"-DINDI_PREFIX=${indi-full}"
"-DXPLANET_PREFIX=${xplanet}"

View file

@ -1,23 +1,9 @@
{lib, stdenv, fetchFromGitHub, nim, htslib, pcre}:
{lib, nimPackages, fetchFromGitHub, pcre}:
let
hts-nim = fetchFromGitHub {
owner = "brentp";
repo = "hts-nim";
rev = "v0.3.4";
sha256 = "0670phk1bq3l9j2zaa8i5wcpc5dyfrc0l2a6c21g0l2mmdczffa7";
};
docopt = fetchFromGitHub {
owner = "docopt";
repo = "docopt.nim";
rev = "v0.6.7";
sha256 = "1ga7ckg21fzwwvh26jp2phn2h3pvkn8g8sm13dxif33rp471bv37";
};
in stdenv.mkDerivation rec {
nimPackages.buildNimPackage rec {
pname = "mosdepth";
version = "0.3.2";
nimBinOnly = true;
src = fetchFromGitHub {
owner = "brentp";
@ -26,15 +12,7 @@ in stdenv.mkDerivation rec {
sha256 = "sha256-uui4yC7ok+pvbXVKfBVsAarH40fnH4fnP8P4uzOqztQ=";
};
nativeBuildInputs = [ nim ];
buildInputs = [ htslib pcre ];
buildPhase = ''
HOME=$TMPDIR
nim -p:${hts-nim}/src -p:${docopt}/src c --nilseqs:on -d:release mosdepth.nim
'';
installPhase = "install -Dt $out/bin mosdepth";
buildInputs = with nimPackages; [ docopt hts-nim pcre ];
meta = with lib; {
description = "fast BAM/CRAM depth calculation for WGS, exome, or targeted sequencing";

View file

@ -1,30 +1,9 @@
{ lib, stdenv, fetchFromGitHub, nim, termbox, pcre }:
{ lib, nimPackages, fetchFromGitHub, nim, termbox, pcre }:
let
noise = fetchFromGitHub {
owner = "jangko";
repo = "nim-noise";
rev = "v0.1.14";
sha256 = "0wndiphznfyb1pac6zysi3bqljwlfwj6ziarcwnpf00sw2zni449";
};
nimbox = fetchFromGitHub {
owner = "dom96";
repo = "nimbox";
rev = "6a56e76c01481176f16ae29b7d7c526bd83f229b";
sha256 = "15x1sdfxa1xcqnr68705jfnlv83lm0xnp2z9iz3pgc4bz5vwn4x1";
};
lscolors = fetchFromGitHub {
owner = "joachimschmidt557";
repo = "nim-lscolors";
rev = "v0.3.3";
sha256 = "0526hqh46lcfsvymb67ldsc8xbfn24vicn3b8wrqnh6mag8wynf4";
};
in stdenv.mkDerivation rec {
nimPackages.buildNimPackage rec {
pname = "nimmm";
version = "0.2.0";
nimBinOnly = true;
src = fetchFromGitHub {
owner = "joachimschmidt557";
@ -33,17 +12,8 @@ in stdenv.mkDerivation rec {
sha256 = "168n61avphbxsxfq8qzcnlqx6wgvz5yrjvs14g25cg3k46hj4xqg";
};
nativeBuildInputs = [ nim ];
buildInputs = [ termbox pcre ];
buildPhase = ''
export HOME=$TMPDIR;
nim -p:${noise} -p:${nimbox} -p:${lscolors}/src c -d:release src/nimmm.nim
'';
installPhase = ''
install -Dt $out/bin src/nimmm
'';
buildInputs = [ termbox pcre ]
++ (with nimPackages; [ noise nimbox lscolors ]);
meta = with lib; {
description = "Terminal file manager written in nim";

View file

@ -1,6 +1,6 @@
{ lib, buildPythonApplication, fetchPypi
, installShellFiles, pbr
, flake8, mock, pycodestyle, pylint, tox
, flake8, mock, pycodestyle, pylint, stestr, tox
, nix-update-script
, testVersion, git-machete
}:
@ -16,10 +16,7 @@ buildPythonApplication rec {
nativeBuildInputs = [ installShellFiles pbr ];
# TODO: Add missing check inputs (2019-11-22):
# - stestr
doCheck = false;
checkInputs = [ flake8 mock pycodestyle pylint tox ];
checkInputs = [ flake8 mock pycodestyle pylint stestr tox ];
postInstall = ''
installShellCompletion --bash --name git-machete completion/git-machete.completion.bash
@ -43,6 +40,6 @@ buildPythonApplication rec {
description = "Git repository organizer and rebase/merge workflow automation tool";
license = licenses.mit;
platforms = platforms.all;
maintainers = [ maintainers.blitz ];
maintainers = with maintainers; [ blitz ];
};
}

View file

@ -1,11 +1,48 @@
{ lib, python3 }:
{ lib
, fetchFromGitHub
, python3
}:
with python3.pkgs;
let
py = python3.override {
packageOverrides = self: super: {
# Upstream is pinning releases incl. dependencies of their dependencies
zeroconf = super.zeroconf.overridePythonAttrs (oldAttrs: rec {
version = "0.31.0";
src = fetchFromGitHub {
owner = "jstasiak";
repo = "python-zeroconf";
rev = version;
sha256 = "158dqay74zvnz6kmpvip4ml0kw59nf2aaajwgaamx0zc8ci1p5pj";
};
});
click = super.click.overridePythonAttrs (oldAttrs: rec {
version = "7.1.2";
src = oldAttrs.src.override {
inherit version;
sha256 = "06kbzd6sjfkqan3miwj9wqyddfxc2b6hi7p5s4dvqjb3gif2bdfj";
};
});
PyChromecast = super.PyChromecast.overridePythonAttrs (oldAttrs: rec {
version = "9.2.0";
src = oldAttrs.src.override {
inherit version;
sha256 = "02ig2wf2yyrnnl88r2n13s1naskwsifwgx3syifmcxygflsmjd3d";
};
});
};
};
in
with py.pkgs;
buildPythonApplication rec {
pname = "catt";
version = "0.12.2";
disabled = python3.pythonOlder "3.4";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-BOETKTkcbLOu5SubiejswU7D47qWS13QZ7rU9x3jf5Y=";
@ -19,19 +56,12 @@ buildPythonApplication rec {
youtube-dl
];
# remove click when 0.12.3 is released
# upstream doesn't use zeroconf directly but pins it for pychromecast
postPatch = ''
substituteInPlace setup.py \
--replace "zeroconf==0.31.0" "" \
--replace "Click>=7.1.2,<8" "click"
'';
doCheck = false; # attempts to access various URLs
pythonImportsCheck = [ "catt" ];
meta = with lib; {
description = "Cast All The Things allows you to send videos from many, many online sources to your Chromecast";
description = "Tool to send media from online sources to Chromecast devices";
homepage = "https://github.com/skorokithakis/catt";
license = licenses.bsd2;
maintainers = with maintainers; [ dtzWill ];

View file

@ -4,23 +4,24 @@
, pkg-config
, glib
, glibc
, libseccomp
, systemd
, nixosTests
}:
stdenv.mkDerivation rec {
pname = "conmon";
version = "2.0.29";
version = "2.0.30";
src = fetchFromGitHub {
owner = "containers";
repo = pname;
rev = "v${version}";
sha256 = "sha256-Idt+bN9Lf6GEjdGC/sM9Ln1ohXhUy78CrmJxSDA2Y0o=";
sha256 = "sha256-NZMuHhQyo+95QTJcR79cyZr86ytkbo4nmaqTF0Bdt+s=";
};
nativeBuildInputs = [ pkg-config ];
buildInputs = [ glib systemd ]
buildInputs = [ glib libseccomp systemd ]
++ lib.optionals (!stdenv.hostPlatform.isMusl) [ glibc glibc.static ];
# manpage requires building the vendored go-md2man

View file

@ -20,11 +20,11 @@
stdenv.mkDerivation rec {
pname = "tali";
version = "40.2";
version = "40.3";
src = fetchurl {
url = "mirror://gnome/sources/tali/${lib.versions.major version}/${pname}-${version}.tar.xz";
sha256 = "9SHsnW1SKA/Pfi1IerbVqIw54yx6n5XrqwKdUsAj4Cs=";
sha256 = "neLxCreZjHprLKYvs3nBgby8HtYqp6gkG8VVHVF4/iE=";
};
nativeBuildInputs = [

View file

@ -30,19 +30,22 @@
stdenv.mkDerivation rec {
pname = "appcenter";
version = "3.7.1";
version = "3.8.0";
src = fetchFromGitHub {
owner = "elementary";
repo = pname;
rev = version;
sha256 = "1llkc0p47jcx992lkwics86vv622dmmvm5hxrdsq26j9crcd5dam";
sha256 = "07lkdpnjj9pxbq8h794qjiidvnysvzx0132w98r1wg9k7ca170bj";
};
patches = [
# Try to remove other backends to make flatpak backend work.
# https://github.com/NixOS/nixpkgs/issues/70214
./flatpak-only.patch
# The homepage banner does not show up on first run,
# has issues with app icon and mouse scrolling.
./drop-homepage-banner.patch
];
passthru = {
@ -82,7 +85,6 @@ stdenv.mkDerivation rec {
];
mesonFlags = [
"-Dhomepage=false"
"-Dpayments=false"
"-Dcurated=false"
];

View file

@ -0,0 +1,234 @@
From b1e09653d755ca6ffd03a1e3e67750e6bcc2bc6f Mon Sep 17 00:00:00 2001
From: Bobby Rong <rjl931189261@126.com>
Date: Wed, 22 Sep 2021 11:54:48 +0800
Subject: [PATCH 2/2] Drop homepage banner
---
src/Views/Homepage.vala | 181 +---------------------------------------
1 file changed, 1 insertion(+), 180 deletions(-)
diff --git a/src/Views/Homepage.vala b/src/Views/Homepage.vala
index 576fc02c..80a1d221 100644
--- a/src/Views/Homepage.vala
+++ b/src/Views/Homepage.vala
@@ -31,67 +31,12 @@ public class AppCenter.Homepage : AbstractView {
public bool viewing_package { get; private set; default = false; }
public AppStream.Category currently_viewed_category;
- private Hdy.Carousel banner_carousel;
- private Gtk.Revealer banner_revealer;
- private Gtk.FlowBox recently_updated_carousel;
- private Gtk.Revealer recently_updated_revealer;
-
- private uint banner_timeout_id;
construct {
- banner_carousel = new Hdy.Carousel () {
- allow_long_swipes = true
- };
-
- var banner_event_box = new Gtk.EventBox ();
- banner_event_box.events |= Gdk.EventMask.ENTER_NOTIFY_MASK;
- banner_event_box.events |= Gdk.EventMask.LEAVE_NOTIFY_MASK;
- banner_event_box.add (banner_carousel);
-
- var banner_dots = new Hdy.CarouselIndicatorDots () {
- carousel = banner_carousel
- };
-
- var banner_grid = new Gtk.Grid () {
- orientation = Gtk.Orientation.VERTICAL
- };
- banner_grid.add (banner_event_box);
- banner_grid.add (banner_dots);
-
- banner_revealer = new Gtk.Revealer ();
- banner_revealer.add (banner_grid);
-
- var recently_updated_label = new Granite.HeaderLabel (_("Recently Updated")) {
- margin_start = 12
- };
-
- recently_updated_carousel = new Gtk.FlowBox () {
- activate_on_single_click = true,
- column_spacing = 12,
- row_spacing = 12,
- homogeneous = true,
- max_children_per_line = 5,
- min_children_per_line = 3
- };
-
- var recently_updated_grid = new Gtk.Grid () {
- margin_end = 12,
- margin_start = 12
- };
- recently_updated_grid.attach (recently_updated_label, 0, 0);
- recently_updated_grid.attach (recently_updated_carousel, 0, 1);
-
- recently_updated_revealer = new Gtk.Revealer ();
- recently_updated_revealer.add (recently_updated_grid );
-
- var categories_label = new Granite.HeaderLabel (_("Categories")) {
- margin_start = 24,
- margin_top = 24
- };
-
category_flow = new Widgets.CategoryFlowBox () {
margin_start = 12,
margin_end =12,
+ margin_top = 12,
valign = Gtk.Align.START
};
@@ -99,9 +44,6 @@ public class AppCenter.Homepage : AbstractView {
column_spacing = 24,
orientation = Gtk.Orientation.VERTICAL
};
- grid.add (banner_revealer);
- grid.add (recently_updated_revealer);
- grid.add (categories_label);
grid.add (category_flow);
scrolled_window = new Gtk.ScrolledWindow (null, null) {
@@ -111,19 +53,6 @@ public class AppCenter.Homepage : AbstractView {
add (scrolled_window);
- var local_package = App.local_package;
- if (local_package != null) {
- var banner = new Widgets.Banner (local_package);
-
- banner_carousel.prepend (banner);
-
- banner.clicked.connect (() => {
- show_package (local_package);
- });
- }
-
- load_banners_and_carousels.begin ();
-
category_flow.child_activated.connect ((child) => {
var item = child as Widgets.CategoryItem;
if (item != null) {
@@ -159,94 +88,8 @@ public class AppCenter.Homepage : AbstractView {
}
}
}
-
- return GLib.Source.REMOVE;
});
});
-
- banner_event_box.enter_notify_event.connect (() => {
- banner_timeout_stop ();
- });
-
- banner_event_box.leave_notify_event.connect (() => {
- banner_timeout_start ();
- });
-
- recently_updated_carousel.child_activated.connect ((child) => {
- var package_row_grid = (AppCenter.Widgets.ListPackageRowGrid) child.get_child ();
-
- show_package (package_row_grid.package);
- });
- }
-
- private async void load_banners_and_carousels () {
- unowned var fp_client = AppCenterCore.FlatpakBackend.get_default ();
- var packages_by_release_date = fp_client.get_featured_packages_by_release_date ();
- var packages_in_banner = new Gee.LinkedList<AppCenterCore.Package> ();
-
- int package_count = 0;
- foreach (var package in packages_by_release_date) {
- if (package_count >= MAX_PACKAGES_IN_BANNER) {
- break;
- }
-
- var installed = false;
- foreach (var origin_package in package.origin_packages) {
- try {
- if (yield origin_package.backend.is_package_installed (origin_package)) {
- installed = true;
- break;
- }
- } catch (Error e) {
- continue;
- }
- }
-
- if (!installed) {
- packages_in_banner.add (package);
- package_count++;
- }
- }
-
- foreach (var package in packages_in_banner) {
- var banner = new Widgets.Banner (package);
- banner.clicked.connect (() => {
- show_package (package);
- });
-
- banner_carousel.add (banner);
- }
-
- banner_carousel.show_all ();
- banner_revealer.reveal_child = true;
- banner_timeout_start ();
-
- foreach (var package in packages_by_release_date) {
- if (recently_updated_carousel.get_children ().length () >= MAX_PACKAGES_IN_CAROUSEL) {
- break;
- }
-
- var installed = false;
- foreach (var origin_package in package.origin_packages) {
- try {
- if (yield origin_package.backend.is_package_installed (origin_package)) {
- installed = true;
- break;
- }
- } catch (Error e) {
- continue;
- }
- }
-
- if (!installed && !(package in packages_in_banner) && !package.is_explicit) {
- var package_row = new AppCenter.Widgets.ListPackageRowGrid (package);
- recently_updated_carousel.add (package_row);
- }
- }
- recently_updated_carousel.show_all ();
- recently_updated_revealer.reveal_child = recently_updated_carousel.get_children ().length () > 0;
-
- page_loaded ();
}
public override void show_package (
@@ -307,26 +150,4 @@ public class AppCenter.Homepage : AbstractView {
var apps = client.get_applications_for_category (category);
app_list_view.add_packages (apps);
}
-
- private void banner_timeout_start () {
- banner_timeout_id = Timeout.add (MILLISECONDS_BETWEEN_BANNER_ITEMS, () => {
- var new_index = (uint) banner_carousel.position + 1;
- var max_index = banner_carousel.n_pages - 1; // 0-based index
-
- if (banner_carousel.position >= max_index) {
- new_index = 0;
- }
-
- banner_carousel.switch_child (new_index, Granite.TRANSITION_DURATION_OPEN);
-
- return Source.CONTINUE;
- });
- }
-
- private void banner_timeout_stop () {
- if (banner_timeout_id != 0) {
- Source.remove (banner_timeout_id);
- banner_timeout_id = 0;
- }
- }
}

View file

@ -1,15 +1,14 @@
From 63594caa1da772de504ab1d93b69aae148f29f64 Mon Sep 17 00:00:00 2001
From 5d3f20b49a89b55e39339a0f90ae7f846356b0e1 Mon Sep 17 00:00:00 2001
From: Bobby Rong <rjl931189261@126.com>
Date: Wed, 1 Sep 2021 12:25:09 +0800
Subject: [PATCH] Drop PackageKitBackend and UbuntuDriversBackend
Date: Wed, 22 Sep 2021 11:54:24 +0800
Subject: [PATCH 1/2] Drop PackageKitBackend and UbuntuDriversBackend
---
src/Application.vala | 14 ---------
src/Core/BackendAggregator.vala | 2 --
src/Core/UpdateManager.vala | 56 ---------------------------------
src/MainWindow.vala | 17 ----------
src/Views/Homepage.vala | 15 ---------
5 files changed, 104 deletions(-)
4 files changed, 89 deletions(-)
diff --git a/src/Application.vala b/src/Application.vala
index 65fae5aa..9d42b14f 100644
@ -161,36 +160,3 @@ index a32ce47b..b9f8594a 100644
return false;
}
diff --git a/src/Views/Homepage.vala b/src/Views/Homepage.vala
index 67d1e208..48af8f61 100644
--- a/src/Views/Homepage.vala
+++ b/src/Views/Homepage.vala
@@ -212,7 +212,6 @@ public class AppCenter.Homepage : AbstractView {
recently_updated_revealer.reveal_child = recently_updated_carousel.get_children ().length () > 0;
var houston = AppCenterCore.Houston.get_default ();
- var pk_client = AppCenterCore.PackageKitBackend.get_default ();
var packages_for_banner = new Gee.LinkedList<AppCenterCore.Package> ();
var newest_ids = yield houston.get_app_ids ("/newest/project");
@@ -220,20 +219,6 @@ public class AppCenter.Homepage : AbstractView {
Utils.shuffle_array (trending_ids);
var packages = new Gee.HashMap<string, AppCenterCore.Package> ();
- packages.set_all (pk_client.get_packages_for_component_ids (newest_ids));
- packages.set_all (pk_client.get_packages_for_component_ids (trending_ids));
-
- if (!AppCenterCore.PackageKitBackend.supports_parallel_package_queries) {
- foreach (var package in packages.values) {
- package.update_state ();
- }
- } else {
- try {
- yield pk_client.update_multiple_package_state (packages.values);
- } catch (Error e) {
- warning ("Error while getting installed state of banner packages: %s", e.message);
- }
- }
foreach (var package in newest_ids) {
if (packages_for_banner.size >= NUM_PACKAGES_IN_BANNER) {

View file

@ -1,8 +1,9 @@
# https://nim-lang.github.io/Nim/packaging.html
# https://nim-lang.org/docs/nimc.html
{ lib, buildPackages, stdenv, fetchurl, fetchgit, fetchFromGitHub, makeWrapper
, openssl, pcre, readline, boehmgc, sqlite, nim-unwrapped }:
{ lib, callPackage, buildPackages, stdenv, fetchurl, fetchgit, fetchFromGitHub
, makeWrapper, openssl, pcre, readline, boehmgc, sqlite, nim-unwrapped
, nimble-unwrapped }:
let
parseCpu = platform:
@ -22,9 +23,9 @@ let
"mips64"
else if isMsp430 then
"msp430"
else if isPowerPC && is32bit then
else if isPower && is32bit then
"powerpc"
else if isPowerPC && is64bit then
else if isPower && is64bit then
"powerpc64"
else if isRiscV && is64bit then
"riscv64"
@ -186,138 +187,141 @@ in {
nim' = buildPackages.nim-unwrapped;
nimble' = buildPackages.nimble-unwrapped;
inherit (stdenv) targetPlatform;
in stdenv.mkDerivation {
name = "${targetPlatform.config}-nim-wrapper-${nim'.version}";
inherit (nim') version;
preferLocalBuild = true;
strictDeps = true;
self = stdenv.mkDerivation {
name = "${targetPlatform.config}-nim-wrapper-${nim'.version}";
inherit (nim') version;
preferLocalBuild = true;
strictDeps = true;
nativeBuildInputs = [ makeWrapper ];
nativeBuildInputs = [ makeWrapper ];
patches = [
./nim.cfg.patch
# Remove configurations that clash with ours
];
patches = [
./nim.cfg.patch
# Remove configurations that clash with ours
];
unpackPhase = ''
runHook preUnpack
tar xf ${nim'.src} nim-$version/config
cd nim-$version
runHook postUnpack
'';
dontConfigure = true;
buildPhase =
# Configure the Nim compiler to use $CC and $CXX as backends
# The compiler is configured by two configuration files, each with
# a different DSL. The order of evaluation matters and that order
# is not documented, so duplicate the configuration across both files.
''
runHook preBuild
cat >> config/config.nims << WTF
switch("os", "${nimTarget.os}")
switch("cpu", "${nimTarget.cpu}")
switch("define", "nixbuild")
# Configure the compiler using the $CC set by Nix at build time
import strutils
let cc = getEnv"CC"
if cc.contains("gcc"):
switch("cc", "gcc")
elif cc.contains("clang"):
switch("cc", "clang")
WTF
mv config/nim.cfg config/nim.cfg.old
cat > config/nim.cfg << WTF
os = "${nimTarget.os}"
cpu = "${nimTarget.cpu}"
define:"nixbuild"
WTF
cat >> config/nim.cfg < config/nim.cfg.old
rm config/nim.cfg.old
cat >> config/nim.cfg << WTF
clang.cpp.exe %= "\$CXX"
clang.cpp.linkerexe %= "\$CXX"
clang.exe %= "\$CC"
clang.linkerexe %= "\$CC"
gcc.cpp.exe %= "\$CXX"
gcc.cpp.linkerexe %= "\$CXX"
gcc.exe %= "\$CC"
gcc.linkerexe %= "\$CC"
WTF
runHook postBuild
unpackPhase = ''
runHook preUnpack
tar xf ${nim'.src} nim-$version/config
cd nim-$version
runHook postUnpack
'';
wrapperArgs = [
"--prefix PATH : ${lib.makeBinPath [ buildPackages.gdb ]}:${
placeholder "out"
}/bin"
# Used by nim-gdb
dontConfigure = true;
"--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ openssl pcre ]}"
# These libraries may be referred to by the standard library.
# This is broken for cross-compilation because the package
# set will be shifted back by nativeBuildInputs.
buildPhase =
# Configure the Nim compiler to use $CC and $CXX as backends
# The compiler is configured by two configuration files, each with
# a different DSL. The order of evaluation matters and that order
# is not documented, so duplicate the configuration across both files.
''
runHook preBuild
cat >> config/config.nims << WTF
"--set NIM_CONFIG_PATH ${placeholder "out"}/etc/nim"
# Use the custom configuration
switch("os", "${nimTarget.os}")
switch("cpu", "${nimTarget.cpu}")
switch("define", "nixbuild")
''--set NIX_HARDENING_ENABLE "''${NIX_HARDENING_ENABLE/fortify}"''
# Fortify hardening appends -O2 to gcc flags which is unwanted for unoptimized nim builds.
];
# Configure the compiler using the $CC set by Nix at build time
import strutils
let cc = getEnv"CC"
if cc.contains("gcc"):
switch("cc", "gcc")
elif cc.contains("clang"):
switch("cc", "clang")
WTF
installPhase = ''
runHook preInstall
mv config/nim.cfg config/nim.cfg.old
cat > config/nim.cfg << WTF
os = "${nimTarget.os}"
cpu = "${nimTarget.cpu}"
define:"nixbuild"
WTF
mkdir -p $out/bin $out/etc
cat >> config/nim.cfg < config/nim.cfg.old
rm config/nim.cfg.old
cp -r config $out/etc/nim
cat >> config/nim.cfg << WTF
clang.cpp.exe %= "\$CXX"
clang.cpp.linkerexe %= "\$CXX"
clang.exe %= "\$CC"
clang.linkerexe %= "\$CC"
gcc.cpp.exe %= "\$CXX"
gcc.cpp.linkerexe %= "\$CXX"
gcc.exe %= "\$CC"
gcc.linkerexe %= "\$CC"
WTF
runHook postBuild
'';
wrapperArgs = [
"--prefix PATH : ${lib.makeBinPath [ buildPackages.gdb ]}:${
placeholder "out"
}/bin"
# Used by nim-gdb
"--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ openssl pcre ]}"
# These libraries may be referred to by the standard library.
# This is broken for cross-compilation because the package
# set will be shifted back by nativeBuildInputs.
"--set NIM_CONFIG_PATH ${placeholder "out"}/etc/nim"
# Use the custom configuration
''--set NIX_HARDENING_ENABLE "''${NIX_HARDENING_ENABLE/fortify}"''
# Fortify hardening appends -O2 to gcc flags which is unwanted for unoptimized nim builds.
];
installPhase = ''
runHook preInstall
mkdir -p $out/bin $out/etc
cp -r config $out/etc/nim
for binpath in ${nim'}/bin/nim?*; do
local binname=`basename $binpath`
makeWrapper \
$binpath $out/bin/${targetPlatform.config}-$binname \
$wrapperArgs
ln -s $out/bin/${targetPlatform.config}-$binname $out/bin/$binname
done
for binpath in ${nim'}/bin/nim?*; do
local binname=`basename $binpath`
makeWrapper \
$binpath $out/bin/${targetPlatform.config}-$binname \
${nim'}/nim/bin/nim $out/bin/${targetPlatform.config}-nim \
--set-default CC $(command -v $CC) \
--set-default CXX $(command -v $CXX) \
$wrapperArgs
ln -s $out/bin/${targetPlatform.config}-$binname $out/bin/$binname
done
ln -s $out/bin/${targetPlatform.config}-nim $out/bin/nim
makeWrapper \
${nim'}/nim/bin/nim $out/bin/${targetPlatform.config}-nim \
--set-default CC $(command -v $CC) \
--set-default CXX $(command -v $CXX) \
$wrapperArgs
ln -s $out/bin/${targetPlatform.config}-nim $out/bin/nim
makeWrapper \
${nim'}/bin/testament $out/bin/${targetPlatform.config}-testament \
$wrapperArgs
ln -s $out/bin/${targetPlatform.config}-testament $out/bin/testament
makeWrapper \
${nim'}/bin/testament $out/bin/${targetPlatform.config}-testament \
$wrapperArgs
ln -s $out/bin/${targetPlatform.config}-testament $out/bin/testament
makeWrapper \
${nimble'}/bin/nimble $out/bin/${targetPlatform.config}-nimble \
--suffix PATH : $out/bin
ln -s $out/bin/${targetPlatform.config}-nimble $out/bin/nimble
makeWrapper \
${nimble'}/bin/nimble $out/bin/${targetPlatform.config}-nimble \
--suffix PATH : $out/bin
ln -s $out/bin/${targetPlatform.config}-nimble $out/bin/nimble
runHook postInstall
'';
runHook postInstall
'';
passthru = {
nim = nim';
nimble = nimble';
};
passthru = {
nim = nim';
nimble = nimble';
};
meta = nim'.meta // {
description = nim'.meta.description
+ " (${targetPlatform.config} wrapper)";
platforms = with lib.platforms; unix ++ genode;
meta = nim'.meta // {
description = nim'.meta.description
+ " (${targetPlatform.config} wrapper)";
platforms = with lib.platforms; unix ++ genode;
};
};
in self // {
pkgs = callPackage ../../../top-level/nim-packages.nix { nim = self; };
};
}

View file

@ -0,0 +1,26 @@
{ lib, stdenv, fetchFromGitHub, cmake, pkg-config, wrapQtAppsHook , qtbase}:
stdenv.mkDerivation rec {
pname = "tytools";
version = "0.9.3";
src = fetchFromGitHub {
owner = "Koromix";
repo = pname;
rev = "v${version}";
sha256 = "0ax6j17f5nm0q4sp8sg1412hd48qp7whdy7dd699kwjcm763bl5j";
};
nativeBuildInputs = [ cmake pkg-config wrapQtAppsHook ];
buildInputs = [
qtbase
];
meta = with lib; {
description = "Collection of tools to manage Teensy boards";
homepage = "https://koromix.dev/tytools";
license = licenses.unlicense;
platforms = platforms.unix;
maintainers = with maintainers; [ ahuzik ];
};
}

View file

@ -0,0 +1,45 @@
{ lib
, stdenv
, fetchurl
, gd
, giflib
, groff
, libpng
, tk
}:
stdenv.mkDerivation rec {
pname = "npiet";
version = "1.3f";
src = fetchurl {
url = "https://www.bertnase.de/npiet/npiet-${version}.tar.gz";
sha256 = "sha256-Le2FYGKr1zWZ6F4edozmvGC6LbItx9aptidj3KBLhVo=";
};
buildInputs = [ gd giflib libpng ];
nativeBuildInputs = [ groff ];
postPatch = ''
# malloc.h is not needed because stdlib.h is already included.
# On macOS, malloc.h does not even exist, resulting in an error.
substituteInPlace npiet-foogol.c \
--replace '#include <malloc.h>' ""
substituteInPlace npietedit \
--replace 'exec wish' 'exec ${tk}/bin/wish'
'';
meta = with lib; {
description = "An interpreter for piet programs. Also includes npietedit and npiet-foogol";
longDescription = ''
npiet is an interpreter for the piet programming language.
Instead of text, piet programs are pictures. Commands are determined based on changes in color.
'';
homepage = "https://www.bertnase.de/npiet/";
license = licenses.gpl2Only;
platforms = platforms.unix;
maintainers = with maintainers; [ Luflosi ];
};
}

View file

@ -19,13 +19,13 @@
stdenv.mkDerivation (rec {
pname = "folly";
version = "2021.09.13.00";
version = "2021.09.20.00";
src = fetchFromGitHub {
owner = "facebook";
repo = "folly";
rev = "v${version}";
sha256 = "sha256-UZfCGvhi6cWUUa56GIYMOgFHn3Ifu9uIHs983SbZCcY=";
sha256 = "sha256-aFTFUtRQOGCDR3pbpw1ViuMFm02GSq04u9GgE9pq33A=";
};
nativeBuildInputs = [

View file

@ -1,6 +1,6 @@
{ lib, stdenv
, fetchpatch, gnu-config, autoreconfHook, bison, binutils-unwrapped
, libiberty, zlib
, libiberty, libintl, zlib
}:
stdenv.mkDerivation {
@ -32,7 +32,7 @@ stdenv.mkDerivation {
strictDeps = true;
nativeBuildInputs = [ autoreconfHook bison ];
buildInputs = [ libiberty zlib.dev ];
buildInputs = [ libiberty zlib ] ++ lib.optionals stdenv.isDarwin [ libintl ];
configurePlatforms = [ "build" "host" ];
configureFlags = [

View file

@ -9,13 +9,13 @@
stdenv.mkDerivation rec {
pname = "symengine";
version = "0.7.0";
version = "0.8.1";
src = fetchFromGitHub {
owner = "symengine";
repo = "symengine";
rev = "v${version}";
sha256 = "sha256-aoitTT9fwTIs3ovfqQjKGgrU+kT5mj+vDHt5lg49JHU=";
sha256 = "sha256-HTDOSgdWo9MWmKeXOkOHAJjgvihUAkSXoYTeMz9XXLI=";
};
nativeBuildInputs = [ cmake ];

View file

@ -0,0 +1,8 @@
{ fetchFromGitHub }:
fetchFromGitHub {
owner = "krux02";
repo = "ast-pattern-matching";
rev = "87f7d163421af5a4f5e5cb6da7b93278e6897e96";
sha256 = "19mb5bb6riia8380p5dpc3q0vwgrj958dd6p7vw8vkvwiqrzg6zq";
}

View file

@ -0,0 +1,43 @@
{ lib, stdenv, nim, nim_builder }:
{ strictDeps ? true, nativeBuildInputs ? [ ], configurePhase ? null
, buildPhase ? null, checkPhase ? null, installPhase ? null, meta ? { }, ...
}@attrs:
stdenv.mkDerivation (attrs // {
inherit strictDeps;
nativeBuildInputs = [ nim nim_builder ] ++ nativeBuildInputs;
configurePhase = if isNull configurePhase then ''
runHook preConfigure
find $NIX_BUILD_TOP -name .attrs.json
nim_builder --phase:configure
runHook postConfigure
'' else
buildPhase;
buildPhase = if isNull buildPhase then ''
runHook preBuild
nim_builder --phase:build
runHook postBuild
'' else
buildPhase;
checkPhase = if isNull checkPhase then ''
runHook preCheck
nim_builder --phase:check
runHook postCheck
'' else
checkPhase;
installPhase = if isNull installPhase then ''
runHook preInstall
nim_builder --phase:install
runHook postInstall
'' else
installPhase;
meta = meta // {
maintainers = (meta.maintainers or [ ]) ++ [ lib.maintainers.ehmry ];
};
})

View file

@ -0,0 +1,7 @@
{ fetchNimble }:
fetchNimble {
pname = "bumpy";
version = "1.0.3";
hash = "sha256-mDmDlhOGoYYjKgF5j808oT2NqRlfcOdLSDE3WtdJFQ0=";
}

View file

@ -0,0 +1,19 @@
{ lib, buildNimPackage, fetchFromGitHub, SDL2 }:
buildNimPackage rec {
pname = "c2nim";
version = "0.9.18";
nimBinOnly = true;
src = fetchFromGitHub {
owner = "nim-lang";
repo = pname;
rev = version;
hash = "sha256-127ux36mfC+PnS2HIQffw+z0TSvzdQXnKRxqYV3XahU=";
};
meta = with lib;
src.meta // {
description = "Tool to translate Ansi C code to Nim";
license = licenses.mit;
maintainers = [ maintainers.ehmry ];
};
}

View file

@ -0,0 +1,7 @@
{ fetchNimble }:
fetchNimble {
pname = "chroma";
version = "0.2.5";
hash = "sha256-6lNHpO2aMorgkaPfo6kRcOs9r5R6T/kislVmkeoulw8=";
}

View file

@ -0,0 +1,8 @@
{ fetchFromGitHub }:
fetchFromGitHub {
owner = "docopt";
repo = "docopt.nim";
rev = "v0.6.7";
sha256 = "1ga7ckg21fzwwvh26jp2phn2h3pvkn8g8sm13dxif33rp471bv37";
}

View file

@ -0,0 +1,12 @@
source $stdenv/setup
export HOME=$NIX_BUILD_TOP
nimble --accept --noSSLCheck develop "${pkgname}@${version}"
# TODO: bring in the certificates for Nimble to verify the fetch of
# the package list.
pkgdir=${NIX_BUILD_TOP}/${pkgname}
find "$pkgdir" -name .git -print0 | xargs -0 rm -rf
cp -a "$pkgdir" "$out"

View file

@ -0,0 +1,20 @@
{ lib, makeOverridable, stdenv, gitMinimal, nim, cacert }:
makeOverridable (
{ pname, version, hash ? lib.fakeHash,
meta ? { }, passthru ? { }, preferLocalBuild ? true }:
stdenv.mkDerivation {
inherit version meta passthru preferLocalBuild;
pname = pname + "-src";
pkgname = pname;
builder = ./builder.sh;
nativeBuildInputs = [ gitMinimal nim ];
outputHash = hash;
outputHashAlgo = null;
outputHashMode = "recursive";
impureEnvVars = lib.fetchers.proxyImpureEnvVars
++ [ "GIT_PROXY_COMMAND" "SOCKS_SERVER" ];
GIT_SSL_CAINFO = "${cacert}/etc/ssl/certs/ca-bundle.crt";
})

View file

@ -0,0 +1,7 @@
{ fetchNimble }:
fetchNimble {
pname = "flatty";
version = "0.2.1";
hash = "sha256-TqNnRh2+i6n98ktLRVQxt9CVw17FGLNYq29rJoMus/0=";
}

View file

@ -0,0 +1,8 @@
{ fetchFromGitHub }:
fetchFromGitHub {
owner = "disruptek";
repo = "frosty";
rev = "0.3.1";
sha256 = "0hd6484ihjgl57gmqyp5xfq5prycb49k0313fqky600mhz71nmyz";
}

View file

@ -0,0 +1,13 @@
{ buildNimPackage, fetchFromGitHub, htslib }:
buildNimPackage rec {
pname = "hts-nim";
version = "0.3.4";
src = fetchFromGitHub {
owner = "brentp";
repo = pname;
rev = "v${version}";
sha256 = "0670phk1bq3l9j2zaa8i5wcpc5dyfrc0l2a6c21g0l2mmdczffa7";
};
propagatedBuildInputs = [ htslib ];
}

View file

@ -0,0 +1,8 @@
{ fetchFromGitHub }:
fetchFromGitHub {
owner = "dom96";
repo = "jester";
rev = "v0.5.0";
sha256 = "0m8a4ss4460jd2lcbqcbdd68jhcy35xg7qdyr95mh8rflwvmcvhk";
}

View file

@ -0,0 +1,8 @@
{ fetchFromGitHub }:
fetchFromGitHub {
owner = "PMunch";
repo = "jsonschema";
rev = "7b41c03e3e1a487d5a8f6b940ca8e764dc2cbabf";
sha256 = "1js64jqd854yjladxvnylij4rsz7212k31ks541pqrdzm6hpblbz";
}

View file

@ -0,0 +1,8 @@
{ fetchFromGitHub }:
fetchFromGitHub {
owner = "karaxnim";
repo = "karax";
rev = "1.1.2";
sha256 = "07ykrd21hd76vlmkqpvv5xvaxw6aaq87bky47p2420ni85a6d94j";
}

View file

@ -0,0 +1,8 @@
{ fetchFromGitHub }:
fetchFromGitHub {
owner = "joachimschmidt557";
repo = "nim-lscolors";
rev = "v0.3.3";
sha256 = "0526hqh46lcfsvymb67ldsc8xbfn24vicn3b8wrqnh6mag8wynf4";
}

View file

@ -0,0 +1,8 @@
{ fetchFromGitHub }:
fetchFromGitHub {
owner = "soasme";
repo = "nim-markdown";
rev = "abdbe5e";
sha256 = "0f3c1sxvhbbds43c9l8cz69pfpf984msj1lv4pb7bzpxb5zil2wy";
}

View file

@ -0,0 +1,19 @@
{ lib, stdenv, nim }:
stdenv.mkDerivation {
pname = "nim_builder";
inherit (nim) version;
dontUnpack = true;
nativeBuildInputs = [ nim ];
buildPhase = ''
cp ${./nim_builder.nim} nim_builder.nim
nim c --nimcache:$TMPDIR nim_builder
'';
installPhase = ''
install -Dt $out/bin nim_builder
'';
meta = {
description = "Internal Nixpkgs utility for buildNimPackage.";
maintainers = [ lib.maintainers.ehmry ];
};
}

View file

@ -0,0 +1,166 @@
# SPDX-FileCopyrightText: 2021 Nixpkgs/NixOS contributors
## Custom Nim builder for Nixpkgs.
import std/[os, osproc, parseutils, sequtils, streams, strutils]
proc findNimbleFile(): string =
## Copied from Nimble.
## Copyright (c) 2015, Dominik Picheta
## BSD3
let dir = getCurrentDir()
result = ""
var hits = 0
for kind, path in walkDir(dir):
if kind in {pcFile, pcLinkToFile}:
let ext = path.splitFile.ext
if ext == ".nimble":
result = path
inc hits
if hits >= 2:
quit("Only one .nimble file should be present in " & dir)
elif hits == 0:
quit("Could not find a file with a .nimble extension in " & dir)
proc getEnvBool(key: string; default = false): bool =
## Parse a boolean environmental variable.
let val = getEnv(key)
if val == "": default
else: parseBool(val)
proc getNimbleFilePath(): string =
## Get the Nimble file for the current package.
if existsEnv"nimbleFile":
getEnv"nimbleFile"
else:
findNimbleFile()
proc getNimbleValue(filePath, key: string; default = ""): string =
## Extract a string value from the Nimble file at ``filePath``.
var
fs = newFileStream(filePath, fmRead)
line: string
if fs.isNil:
quit("could not open " & filePath)
while fs.readline(line):
if line.startsWith(key):
var i = key.len
i.inc skipWhile(line, Whitespace, i)
if line[i] == '=':
inc i
i.inc skipWhile(line, Whitespace, i)
discard parseUntil(line, result, Newlines, i)
if result.len > 0 and result[0] == '"':
result = result.unescape
return
default
proc getNimbleValues(filePath, key: string): seq[string] =
## Extract a string sequence from the Nimble file at ``filePath``.
var gunk = getNimbleValue(filePath, key)
result = gunk.strip(chars = {'@', '[', ']'}).split(',')
if result == @[""]: reset result
apply(result) do (s: var string):
s = s.strip()
if s.len > 0 and s[0] == '"':
s = s.unescape()
proc configurePhase*() =
## Generate "config.nims" which will be read by the Nim
## compiler during later phases.
const configFilePath = "config.nims"
echo "generating ", configFilePath
let
nf = getNimbleFilePath()
mode =
if fileExists configFilePath: fmAppend
else: fmWrite
var cfg = newFileStream(configFilePath, mode)
proc switch(key, val: string) =
cfg.writeLine("switch(", key.escape, ",", val.escape, ")")
switch("backend", nf.getNimbleValue("backend", "c"))
switch("nimcache", getEnv("NIX_BUILD_TOP", ".") / "nimcache")
if getEnvBool("nimRelease", true):
switch("define", "release")
for def in getEnv("nimDefines").split:
if def != "":
switch("define", def)
for input in getEnv("buildInputs").split:
if input != "":
for nimbleFile in walkFiles(input / "*.nimble"):
let inputSrc = normalizedPath(
input / nimbleFile.getNimbleValue("srcDir", "."))
echo "found nimble input ", inputSrc
switch("path", inputSrc)
close(cfg)
proc buildPhase*() =
## Build the programs listed in the Nimble file and
## optionally some documentation.
var cmds: seq[string]
proc before(idx: int) =
echo "build job ", idx, ": ", cmds[idx]
let
nf = getNimbleFilePath()
bins = nf.getNimbleValues("bin")
srcDir = nf.getNimbleValue("srcDir", ".")
binDir = getenv("outputBin", getenv("out", "/dev/null")) / "bin"
if bins != @[]:
for bin in bins:
cmds.add("nim compile $# --outdir:$# $#" %
[getenv"nimFlags", binDir, normalizedPath(srcDir / bin)])
if getEnvBool"nimDoc":
echo "generating documentation"
let docDir = getenv("outputDoc", (getenv("out", "/dev/null") / "doc"))
for path in walkFiles(srcDir / "*.nim"):
cmds.add("nim doc --outdir:$# $#" % [docDir, path])
if cmds.len > 0:
let err = execProcesses(
cmds, n = 1,
beforeRunEvent = before)
if err != 0: quit("build phase failed", err)
proc installPhase*() =
## Install the Nim sources if ``nimBinOnly`` is not
## set in the environment.
if not getEnvBool"nimBinOnly":
let
nf = getNimbleFilePath()
srcDir = nf.getNimbleValue("srcDir", ".")
devDir = getenv("outputDev", getenv("out", "/dev/null"))
echo "Install ", srcDir, " to ", devDir
copyDir(normalizedPath(srcDir), normalizedPath(devDir / srcDir))
copyFile(nf, devDir / nf.extractFilename)
proc checkPhase*() =
## Build and run the tests in ``tests``.
var cmds: seq[string]
proc before(idx: int) =
echo "check job ", idx, ": ", cmds[idx]
for path in walkPattern("tests/t*.nim"):
cmds.add("nim r $#" % [path])
let err = execProcesses(
cmds, n = 1,
beforeRunEvent = before)
if err != 0: quit("check phase failed", err)
when isMainModule:
import std/parseopt
var phase: string
for kind, key, val in getopt():
case kind
of cmdLongOption:
case key.toLowerAscii
of "phase":
if phase != "": quit("only a single phase may be specified")
phase = val
else: quit("unhandled argument " & key)
of cmdEnd: discard
else: quit("unhandled argument " & key)
case phase
of "configure": configurePhase()
of "build": buildPhase()
of "install": installPhase()
of "check": checkPhase()
else: quit("unhandled phase " & phase)

View file

@ -0,0 +1,8 @@
{ fetchFromGitHub }:
fetchFromGitHub {
owner = "dom96";
repo = "nimbox";
rev = "6a56e76c01481176f16ae29b7d7c526bd83f229b";
sha256 = "15x1sdfxa1xcqnr68705jfnlv83lm0xnp2z9iz3pgc4bz5vwn4x1";
}

View file

@ -0,0 +1,8 @@
{ fetchFromGitHub }:
fetchFromGitHub {
owner = "cheatfate";
repo = "nimcrypto";
rev = "a5742a9a214ac33f91615f3862c7b099aec43b00";
sha256 = "0al0jsaicm8vyr63n909dq1glhvpra1n9sllmj0r7lsjsdb59wsz";
}

View file

@ -0,0 +1,7 @@
{ fetchNimble }:
fetchNimble {
pname = "nimsimd";
version = "1.0.0";
hash = "sha256-kp61fylAJ6MSN9hLYLi7CU2lxVR/lbrNCvZTe0LJLGo=";
}

View file

@ -0,0 +1,8 @@
{ fetchFromGitHub }:
fetchFromGitHub {
owner = "jangko";
repo = "nim-noise";
rev = "v0.1.14";
sha256 = "0wndiphznfyb1pac6zysi3bqljwlfwj6ziarcwnpf00sw2zni449";
}

View file

@ -0,0 +1,8 @@
{ fetchFromGitHub }:
fetchFromGitHub {
owner = "Araq";
repo = "packedjson";
rev = "7198cc8";
sha256 = "1ay2zd88q8hvpvigsg8h0y5vc65hk3lk0d48fy9hwg4lcng19mp1";
}

View file

@ -0,0 +1,7 @@
{ fetchNimble }:
fetchNimble {
pname = "pixie";
version = "1.1.3";
hash = "sha256-xKIejVxOd19mblL1ZwpJH91dgKQS5g8U08EL8lGGelA=";
}

View file

@ -0,0 +1,8 @@
{ fetchFromGitHub }:
fetchFromGitHub {
owner = "zedeus";
repo = "redis";
rev = "94bcbf1";
sha256 = "1p9zv4f4lqrjqa8fk98cb89b9fzlf866jc584ll9sws14904i80j";
}

View file

@ -0,0 +1,8 @@
{ fetchFromGitHub }:
fetchFromGitHub {
owner = "zedeus";
repo = "redpool";
rev = "57aeb25";
sha256 = "0fph7qlia6fvya1zqzbgvww2hk5pd0vq1wlf9ij9jyn655mg0w3q";
}

View file

@ -0,0 +1,8 @@
{ fetchFromGitHub }:
fetchFromGitHub {
owner = "nitely";
repo = "nim-regex";
rev = "2e32fdc";
sha256 = "1hrl40mwql7nh4wc7sdhmk8bj5728b93v5a93j49v660l0rn4qx8";
}

View file

@ -0,0 +1,13 @@
{ buildNimPackage, fetchFromGitHub, libsass }:
buildNimPackage rec {
pname = "sass";
version = "e683aa1";
src = fetchFromGitHub {
owner = "dom96";
repo = pname;
rev = version;
sha256 = "0qvly5rilsqqsyvr67pqhglm55ndc4nd6v90jwswbnigxiqf79lc";
};
propagatedBuildInputs = [ libsass ];
}

Some files were not shown because too many files have changed in this diff Show more