2337 lines
72 KiB
Nix
2337 lines
72 KiB
Nix
# This file was @generated by crate2nix 0.10.0 with the command:
|
|
# "generate" "-f" "Cargo.toml"
|
|
# See https://github.com/kolloch/crate2nix for more info.
|
|
|
|
{ nixpkgs ? <nixpkgs>
|
|
, pkgs ? import nixpkgs { config = { }; }
|
|
, lib ? pkgs.lib
|
|
, stdenv ? pkgs.stdenv
|
|
, buildRustCrateForPkgs ? if buildRustCrate != null
|
|
then lib.warn "crate2nix: Passing `buildRustCrate` as argument to Cargo.nix is deprecated. If you don't customize `buildRustCrate`, replace `callPackage ./Cargo.nix {}` by `import ./Cargo.nix { inherit pkgs; }`, and if you need to customize `buildRustCrate`, use `buildRustCrateForPkgs` instead." (_: buildRustCrate)
|
|
else pkgs: pkgs.buildRustCrate
|
|
# Deprecated
|
|
, buildRustCrate ? null
|
|
# This is used as the `crateOverrides` argument for `buildRustCrate`.
|
|
, defaultCrateOverrides ? pkgs.defaultCrateOverrides
|
|
# The features to enable for the root_crate or the workspace_members.
|
|
, rootFeatures ? [ "default" ]
|
|
# If true, throw errors instead of issueing deprecation warnings.
|
|
, strictDeprecation ? false
|
|
# Used for conditional compilation based on CPU feature detection.
|
|
, targetFeatures ? [ ]
|
|
# Whether to perform release builds: longer compile times, faster binaries.
|
|
, release ? true
|
|
# Additional crate2nix configuration if it exists.
|
|
, crateConfig ? if builtins.pathExists ./crate-config.nix
|
|
then pkgs.callPackage ./crate-config.nix { }
|
|
else { }
|
|
}:
|
|
|
|
rec {
|
|
#
|
|
# "public" attributes that we attempt to keep stable with new versions of crate2nix.
|
|
#
|
|
|
|
rootCrate = rec {
|
|
packageId = "nixos";
|
|
|
|
# Use this attribute to refer to the derivation building your root crate package.
|
|
# You can override the features with rootCrate.build.override { features = [ "default" "feature1" ... ]; }.
|
|
build = internal.buildRustCrateWithFeatures {
|
|
inherit packageId;
|
|
};
|
|
|
|
# Debug support which might change between releases.
|
|
# File a bug if you depend on any for non-debug work!
|
|
debug = internal.debugCrate { inherit packageId; };
|
|
};
|
|
# Refer your crate build derivation by name here.
|
|
# You can override the features with
|
|
# workspaceMembers."${crateName}".build.override { features = [ "default" "feature1" ... ]; }.
|
|
workspaceMembers = {
|
|
"nixos" = rec {
|
|
packageId = "nixos";
|
|
build = internal.buildRustCrateWithFeatures {
|
|
packageId = "nixos";
|
|
};
|
|
|
|
# Debug support which might change between releases.
|
|
# File a bug if you depend on any for non-debug work!
|
|
debug = internal.debugCrate { inherit packageId; };
|
|
};
|
|
};
|
|
|
|
# A derivation that joins the outputs of all workspace members together.
|
|
allWorkspaceMembers = pkgs.symlinkJoin {
|
|
name = "all-workspace-members";
|
|
paths =
|
|
let members = builtins.attrValues workspaceMembers;
|
|
in builtins.map (m: m.build) members;
|
|
};
|
|
|
|
#
|
|
# "internal" ("private") attributes that may change in every new version of crate2nix.
|
|
#
|
|
|
|
internal = rec {
|
|
# Build and dependency information for crates.
|
|
# Many of the fields are passed one-to-one to buildRustCrate.
|
|
#
|
|
# Noteworthy:
|
|
# * `dependencies`/`buildDependencies`: similar to the corresponding fields for buildRustCrate.
|
|
# but with additional information which is used during dependency/feature resolution.
|
|
# * `resolvedDependencies`: the selected default features reported by cargo - only included for debugging.
|
|
# * `devDependencies` as of now not used by `buildRustCrate` but used to
|
|
# inject test dependencies into the build
|
|
|
|
crates = {
|
|
"anyhow" = rec {
|
|
crateName = "anyhow";
|
|
version = "1.0.66";
|
|
edition = "2018";
|
|
sha256 = "1xj3ahmwjlbiqsajhkaa0q6hqwb4l3l5rkfxa7jk1498r3fn2qi1";
|
|
authors = [
|
|
"David Tolnay <dtolnay@gmail.com>"
|
|
];
|
|
features = {
|
|
"backtrace" = [ "dep:backtrace" ];
|
|
"default" = [ "std" ];
|
|
};
|
|
resolvedDefaultFeatures = [ "default" "std" ];
|
|
};
|
|
"autocfg" = rec {
|
|
crateName = "autocfg";
|
|
version = "1.1.0";
|
|
edition = "2015";
|
|
sha256 = "1ylp3cb47ylzabimazvbz9ms6ap784zhb6syaz6c1jqpmcmq0s6l";
|
|
authors = [
|
|
"Josh Stone <cuviper@gmail.com>"
|
|
];
|
|
|
|
};
|
|
"bitflags" = rec {
|
|
crateName = "bitflags";
|
|
version = "1.3.2";
|
|
edition = "2018";
|
|
sha256 = "12ki6w8gn1ldq7yz9y680llwk5gmrhrzszaa17g1sbrw2r2qvwxy";
|
|
authors = [
|
|
"The Rust Project Developers"
|
|
];
|
|
features = {
|
|
"compiler_builtins" = [ "dep:compiler_builtins" ];
|
|
"core" = [ "dep:core" ];
|
|
"rustc-dep-of-std" = [ "core" "compiler_builtins" ];
|
|
};
|
|
resolvedDefaultFeatures = [ "default" ];
|
|
};
|
|
"cairo-rs" = rec {
|
|
crateName = "cairo-rs";
|
|
version = "0.9.1";
|
|
edition = "2015";
|
|
sha256 = "1f5x6ipfpzz0ffph0pg0xfkdfcbr0jp59714zz857jp88zhg5h65";
|
|
libName = "cairo";
|
|
authors = [
|
|
"The Gtk-rs Project Developers"
|
|
];
|
|
dependencies = [
|
|
{
|
|
name = "bitflags";
|
|
packageId = "bitflags";
|
|
}
|
|
{
|
|
name = "cairo-sys-rs";
|
|
packageId = "cairo-sys-rs";
|
|
}
|
|
{
|
|
name = "glib";
|
|
packageId = "glib";
|
|
optional = true;
|
|
}
|
|
{
|
|
name = "glib-sys";
|
|
packageId = "glib-sys";
|
|
optional = true;
|
|
}
|
|
{
|
|
name = "gobject-sys";
|
|
packageId = "gobject-sys";
|
|
optional = true;
|
|
}
|
|
{
|
|
name = "libc";
|
|
packageId = "libc";
|
|
}
|
|
{
|
|
name = "thiserror";
|
|
packageId = "thiserror";
|
|
}
|
|
];
|
|
features = {
|
|
"default" = [ "use_glib" "freetype" ];
|
|
"dox" = [ "cairo-sys-rs/dox" "glib/dox" ];
|
|
"embed-lgpl-docs" = [ "gtk-rs-lgpl-docs" ];
|
|
"freetype" = [ "cairo-sys-rs/freetype" ];
|
|
"glib" = [ "dep:glib" ];
|
|
"glib-sys" = [ "dep:glib-sys" ];
|
|
"gobject-sys" = [ "dep:gobject-sys" ];
|
|
"gtk-rs-lgpl-docs" = [ "dep:gtk-rs-lgpl-docs" ];
|
|
"pdf" = [ "cairo-sys-rs/pdf" ];
|
|
"png" = [ "cairo-sys-rs/png" ];
|
|
"ps" = [ "cairo-sys-rs/ps" ];
|
|
"purge-lgpl-docs" = [ "gtk-rs-lgpl-docs" ];
|
|
"script" = [ "cairo-sys-rs/script" ];
|
|
"svg" = [ "cairo-sys-rs/svg" ];
|
|
"use_glib" = [ "glib" "glib-sys" "gobject-sys" "cairo-sys-rs/use_glib" ];
|
|
"v1_14" = [ "cairo-sys-rs/v1_14" ];
|
|
"v1_16" = [ "v1_14" "cairo-sys-rs/v1_16" ];
|
|
"win32-surface" = [ "cairo-sys-rs/win32-surface" ];
|
|
"xcb" = [ "cairo-sys-rs/xcb" ];
|
|
"xlib" = [ "cairo-sys-rs/xlib" ];
|
|
};
|
|
resolvedDefaultFeatures = [ "default" "freetype" "glib" "glib-sys" "gobject-sys" "use_glib" "xcb" ];
|
|
};
|
|
"cairo-sys-rs" = rec {
|
|
crateName = "cairo-sys-rs";
|
|
version = "0.10.0";
|
|
edition = "2015";
|
|
sha256 = "19wch8zc11hbi724mn16hhqyff8kw5c5bsbdlzpxdwfmkadn7lif";
|
|
libName = "cairo_sys";
|
|
authors = [
|
|
"The Gtk-rs Project Developers"
|
|
];
|
|
dependencies = [
|
|
{
|
|
name = "glib-sys";
|
|
packageId = "glib-sys";
|
|
optional = true;
|
|
}
|
|
{
|
|
name = "libc";
|
|
packageId = "libc";
|
|
}
|
|
];
|
|
buildDependencies = [
|
|
{
|
|
name = "system-deps";
|
|
packageId = "system-deps";
|
|
}
|
|
];
|
|
features = {
|
|
"dox" = [ "x11/dox" ];
|
|
"glib-sys" = [ "dep:glib-sys" ];
|
|
"use_glib" = [ "glib-sys" ];
|
|
"v1_16" = [ "v1_14" ];
|
|
"win32-surface" = [ "winapi" ];
|
|
"winapi" = [ "dep:winapi" ];
|
|
"x11" = [ "dep:x11" ];
|
|
"xlib" = [ "x11" ];
|
|
};
|
|
resolvedDefaultFeatures = [ "freetype" "glib-sys" "use_glib" "xcb" ];
|
|
};
|
|
"cc" = rec {
|
|
crateName = "cc";
|
|
version = "1.0.73";
|
|
edition = "2018";
|
|
crateBin = [ ];
|
|
sha256 = "04ccylrjq94jssh8f7d7hxv64gs9f1m1jrsxb7wqgfxk4xljmzrg";
|
|
authors = [
|
|
"Alex Crichton <alex@alexcrichton.com>"
|
|
];
|
|
features = {
|
|
"jobserver" = [ "dep:jobserver" ];
|
|
"parallel" = [ "jobserver" ];
|
|
};
|
|
};
|
|
"cfg-if" = rec {
|
|
crateName = "cfg-if";
|
|
version = "1.0.0";
|
|
edition = "2018";
|
|
sha256 = "1za0vb97n4brpzpv8lsbnzmq5r8f2b0cpqqr0sy8h5bn751xxwds";
|
|
authors = [
|
|
"Alex Crichton <alex@alexcrichton.com>"
|
|
];
|
|
features = {
|
|
"compiler_builtins" = [ "dep:compiler_builtins" ];
|
|
"core" = [ "dep:core" ];
|
|
"rustc-dep-of-std" = [ "core" "compiler_builtins" ];
|
|
};
|
|
};
|
|
"either" = rec {
|
|
crateName = "either";
|
|
version = "1.8.0";
|
|
edition = "2018";
|
|
sha256 = "15z70yaivlkpx27vzv99ibf8d2x5jp24yn69y0xi20w86v4c3rch";
|
|
authors = [
|
|
"bluss"
|
|
];
|
|
features = {
|
|
"default" = [ "use_std" ];
|
|
"serde" = [ "dep:serde" ];
|
|
};
|
|
};
|
|
"futures-channel" = rec {
|
|
crateName = "futures-channel";
|
|
version = "0.3.25";
|
|
edition = "2018";
|
|
sha256 = "1vcyyxwdgh92nl277053zvqd3qpzf6jhb5kibgs0aq95j9d2dfjj";
|
|
dependencies = [
|
|
{
|
|
name = "futures-core";
|
|
packageId = "futures-core";
|
|
usesDefaultFeatures = false;
|
|
}
|
|
];
|
|
features = {
|
|
"alloc" = [ "futures-core/alloc" ];
|
|
"default" = [ "std" ];
|
|
"futures-sink" = [ "dep:futures-sink" ];
|
|
"sink" = [ "futures-sink" ];
|
|
"std" = [ "alloc" "futures-core/std" ];
|
|
};
|
|
resolvedDefaultFeatures = [ "alloc" "default" "std" ];
|
|
};
|
|
"futures-core" = rec {
|
|
crateName = "futures-core";
|
|
version = "0.3.25";
|
|
edition = "2018";
|
|
sha256 = "1b6k9fd6bkga9556jyx78di278bdp2p81cls99nawcs6grx9m404";
|
|
features = {
|
|
"default" = [ "std" ];
|
|
"std" = [ "alloc" ];
|
|
};
|
|
resolvedDefaultFeatures = [ "alloc" "default" "std" ];
|
|
};
|
|
"futures-executor" = rec {
|
|
crateName = "futures-executor";
|
|
version = "0.3.25";
|
|
edition = "2018";
|
|
sha256 = "1qkll0s12i4ry48yqh08ikl7n8gyz8in2f6zbsmpdh8lczgqbk3s";
|
|
dependencies = [
|
|
{
|
|
name = "futures-core";
|
|
packageId = "futures-core";
|
|
usesDefaultFeatures = false;
|
|
}
|
|
{
|
|
name = "futures-task";
|
|
packageId = "futures-task";
|
|
usesDefaultFeatures = false;
|
|
}
|
|
{
|
|
name = "futures-util";
|
|
packageId = "futures-util";
|
|
usesDefaultFeatures = false;
|
|
}
|
|
];
|
|
features = {
|
|
"default" = [ "std" ];
|
|
"num_cpus" = [ "dep:num_cpus" ];
|
|
"std" = [ "futures-core/std" "futures-task/std" "futures-util/std" ];
|
|
"thread-pool" = [ "std" "num_cpus" ];
|
|
};
|
|
resolvedDefaultFeatures = [ "default" "std" ];
|
|
};
|
|
"futures-macro" = rec {
|
|
crateName = "futures-macro";
|
|
version = "0.3.25";
|
|
edition = "2018";
|
|
sha256 = "0pc3c5mydmwy50f0whcljcd41f0z1ci0r65dka8r2syqagh8ryxx";
|
|
procMacro = true;
|
|
dependencies = [
|
|
{
|
|
name = "proc-macro2";
|
|
packageId = "proc-macro2";
|
|
}
|
|
{
|
|
name = "quote";
|
|
packageId = "quote";
|
|
}
|
|
{
|
|
name = "syn";
|
|
packageId = "syn";
|
|
features = [ "full" ];
|
|
}
|
|
];
|
|
|
|
};
|
|
"futures-task" = rec {
|
|
crateName = "futures-task";
|
|
version = "0.3.25";
|
|
edition = "2018";
|
|
sha256 = "1sp6k18py8nv3dmy3j00w83bfmk6fzi7mwzxsflym9nrqlx3kyrg";
|
|
features = {
|
|
"default" = [ "std" ];
|
|
"std" = [ "alloc" ];
|
|
};
|
|
resolvedDefaultFeatures = [ "alloc" "default" "std" ];
|
|
};
|
|
"futures-util" = rec {
|
|
crateName = "futures-util";
|
|
version = "0.3.25";
|
|
edition = "2018";
|
|
sha256 = "1mk5vh8q5bkkvxji8r1nimh87hgi190nz4l4zynrqbxxgac7cxhr";
|
|
dependencies = [
|
|
{
|
|
name = "futures-core";
|
|
packageId = "futures-core";
|
|
usesDefaultFeatures = false;
|
|
}
|
|
{
|
|
name = "futures-macro";
|
|
packageId = "futures-macro";
|
|
optional = true;
|
|
usesDefaultFeatures = false;
|
|
}
|
|
{
|
|
name = "futures-task";
|
|
packageId = "futures-task";
|
|
usesDefaultFeatures = false;
|
|
}
|
|
{
|
|
name = "pin-project-lite";
|
|
packageId = "pin-project-lite";
|
|
}
|
|
{
|
|
name = "pin-utils";
|
|
packageId = "pin-utils";
|
|
}
|
|
{
|
|
name = "slab";
|
|
packageId = "slab";
|
|
optional = true;
|
|
}
|
|
];
|
|
features = {
|
|
"alloc" = [ "futures-core/alloc" "futures-task/alloc" ];
|
|
"async-await-macro" = [ "async-await" "futures-macro" ];
|
|
"channel" = [ "std" "futures-channel" ];
|
|
"compat" = [ "std" "futures_01" ];
|
|
"default" = [ "std" "async-await" "async-await-macro" ];
|
|
"futures-channel" = [ "dep:futures-channel" ];
|
|
"futures-io" = [ "dep:futures-io" ];
|
|
"futures-macro" = [ "dep:futures-macro" ];
|
|
"futures-sink" = [ "dep:futures-sink" ];
|
|
"futures_01" = [ "dep:futures_01" ];
|
|
"io" = [ "std" "futures-io" "memchr" ];
|
|
"io-compat" = [ "io" "compat" "tokio-io" ];
|
|
"memchr" = [ "dep:memchr" ];
|
|
"sink" = [ "futures-sink" ];
|
|
"slab" = [ "dep:slab" ];
|
|
"std" = [ "alloc" "futures-core/std" "futures-task/std" "slab" ];
|
|
"tokio-io" = [ "dep:tokio-io" ];
|
|
"unstable" = [ "futures-core/unstable" "futures-task/unstable" ];
|
|
"write-all-vectored" = [ "io" ];
|
|
};
|
|
resolvedDefaultFeatures = [ "alloc" "async-await" "async-await-macro" "default" "futures-macro" "slab" "std" ];
|
|
};
|
|
"glib" = rec {
|
|
crateName = "glib";
|
|
version = "0.10.3";
|
|
edition = "2015";
|
|
sha256 = "1ifh56nhvhcrssxqkad876qqrlnl16q6b8ap3f7ncpjinw9m0s0c";
|
|
authors = [
|
|
"The Gtk-rs Project Developers"
|
|
];
|
|
dependencies = [
|
|
{
|
|
name = "bitflags";
|
|
packageId = "bitflags";
|
|
}
|
|
{
|
|
name = "futures-channel";
|
|
packageId = "futures-channel";
|
|
}
|
|
{
|
|
name = "futures-core";
|
|
packageId = "futures-core";
|
|
}
|
|
{
|
|
name = "futures-executor";
|
|
packageId = "futures-executor";
|
|
}
|
|
{
|
|
name = "futures-task";
|
|
packageId = "futures-task";
|
|
}
|
|
{
|
|
name = "futures-util";
|
|
packageId = "futures-util";
|
|
}
|
|
{
|
|
name = "glib-macros";
|
|
packageId = "glib-macros";
|
|
}
|
|
{
|
|
name = "glib-sys";
|
|
packageId = "glib-sys";
|
|
}
|
|
{
|
|
name = "gobject-sys";
|
|
packageId = "gobject-sys";
|
|
}
|
|
{
|
|
name = "libc";
|
|
packageId = "libc";
|
|
}
|
|
{
|
|
name = "once_cell";
|
|
packageId = "once_cell";
|
|
}
|
|
];
|
|
features = {
|
|
"dox" = [ "glib-sys/dox" "gobject-sys/dox" ];
|
|
"futures-preview" = [ "dep:futures-preview" ];
|
|
"v2_44" = [ "glib-sys/v2_44" "gobject-sys/v2_44" ];
|
|
"v2_46" = [ "v2_44" "glib-sys/v2_46" "gobject-sys/v2_46" ];
|
|
"v2_48" = [ "v2_46" "glib-sys/v2_48" ];
|
|
"v2_50" = [ "v2_48" "glib-sys/v2_50" ];
|
|
"v2_52" = [ "v2_50" "glib-sys/v2_52" ];
|
|
"v2_54" = [ "v2_52" "glib-sys/v2_54" "gobject-sys/v2_54" ];
|
|
"v2_56" = [ "v2_54" "glib-sys/v2_56" ];
|
|
"v2_58" = [ "v2_56" "glib-sys/v2_58" "gobject-sys/v2_58" ];
|
|
"v2_60" = [ "v2_58" "glib-sys/v2_60" ];
|
|
"v2_62" = [ "v2_60" "glib-sys/v2_62" "gobject-sys/v2_62" ];
|
|
"v2_64" = [ "v2_62" "glib-sys/v2_64" ];
|
|
};
|
|
};
|
|
"glib-macros" = rec {
|
|
crateName = "glib-macros";
|
|
version = "0.10.1";
|
|
edition = "2018";
|
|
sha256 = "0fa00s6gnj3hgri9z926199jidczlmjr1db0n4r80sins4k6lj21";
|
|
procMacro = true;
|
|
authors = [
|
|
"The Gtk-rs Project Developers"
|
|
];
|
|
dependencies = [
|
|
{
|
|
name = "anyhow";
|
|
packageId = "anyhow";
|
|
}
|
|
{
|
|
name = "heck";
|
|
packageId = "heck";
|
|
}
|
|
{
|
|
name = "itertools";
|
|
packageId = "itertools";
|
|
}
|
|
{
|
|
name = "proc-macro-crate";
|
|
packageId = "proc-macro-crate";
|
|
}
|
|
{
|
|
name = "proc-macro-error";
|
|
packageId = "proc-macro-error";
|
|
}
|
|
{
|
|
name = "proc-macro2";
|
|
packageId = "proc-macro2";
|
|
}
|
|
{
|
|
name = "quote";
|
|
packageId = "quote";
|
|
}
|
|
{
|
|
name = "syn";
|
|
packageId = "syn";
|
|
}
|
|
];
|
|
|
|
};
|
|
"glib-sys" = rec {
|
|
crateName = "glib-sys";
|
|
version = "0.10.1";
|
|
edition = "2015";
|
|
sha256 = "1hfdwilf3dnrv3pnfbwmp3h2afgwvfsapcgjfg8276kflsbvksf7";
|
|
libName = "glib_sys";
|
|
authors = [
|
|
"The Gtk-rs Project Developers"
|
|
];
|
|
dependencies = [
|
|
{
|
|
name = "libc";
|
|
packageId = "libc";
|
|
}
|
|
];
|
|
buildDependencies = [
|
|
{
|
|
name = "system-deps";
|
|
packageId = "system-deps";
|
|
}
|
|
];
|
|
features = {
|
|
"v2_46" = [ "v2_44" ];
|
|
"v2_48" = [ "v2_46" ];
|
|
"v2_50" = [ "v2_48" ];
|
|
"v2_52" = [ "v2_50" ];
|
|
"v2_54" = [ "v2_52" ];
|
|
"v2_56" = [ "v2_54" ];
|
|
"v2_58" = [ "v2_56" ];
|
|
"v2_60" = [ "v2_58" ];
|
|
"v2_62" = [ "v2_60" ];
|
|
"v2_64" = [ "v2_62" ];
|
|
};
|
|
};
|
|
"gobject-sys" = rec {
|
|
crateName = "gobject-sys";
|
|
version = "0.10.0";
|
|
edition = "2015";
|
|
sha256 = "1311d3zbdhl1g7ibj1iy1650513yrhxbjxgfhazn52ii1jv368cm";
|
|
libName = "gobject_sys";
|
|
authors = [
|
|
"The Gtk-rs Project Developers"
|
|
];
|
|
dependencies = [
|
|
{
|
|
name = "glib-sys";
|
|
packageId = "glib-sys";
|
|
}
|
|
{
|
|
name = "libc";
|
|
packageId = "libc";
|
|
}
|
|
];
|
|
buildDependencies = [
|
|
{
|
|
name = "system-deps";
|
|
packageId = "system-deps";
|
|
}
|
|
];
|
|
features = {
|
|
"v2_46" = [ "v2_44" ];
|
|
"v2_54" = [ "v2_46" ];
|
|
"v2_58" = [ "v2_54" ];
|
|
"v2_62" = [ "v2_58" ];
|
|
};
|
|
};
|
|
"heck" = rec {
|
|
crateName = "heck";
|
|
version = "0.3.3";
|
|
edition = "2018";
|
|
sha256 = "0b0kkr790p66lvzn9nsmfjvydrbmh9z5gb664jchwgw64vxiwqkd";
|
|
authors = [
|
|
"Without Boats <woboats@gmail.com>"
|
|
];
|
|
dependencies = [
|
|
{
|
|
name = "unicode-segmentation";
|
|
packageId = "unicode-segmentation";
|
|
}
|
|
];
|
|
|
|
};
|
|
"itertools" = rec {
|
|
crateName = "itertools";
|
|
version = "0.9.0";
|
|
edition = "2018";
|
|
sha256 = "0jyml7ygr7kijkcjdl3fk5f34y5h5jsavclim7l13zjiavw1hkr8";
|
|
authors = [
|
|
"bluss"
|
|
];
|
|
dependencies = [
|
|
{
|
|
name = "either";
|
|
packageId = "either";
|
|
usesDefaultFeatures = false;
|
|
}
|
|
];
|
|
features = {
|
|
"default" = [ "use_std" ];
|
|
};
|
|
resolvedDefaultFeatures = [ "default" "use_std" ];
|
|
};
|
|
"libc" = rec {
|
|
crateName = "libc";
|
|
version = "0.2.136";
|
|
edition = "2015";
|
|
sha256 = "15zi66mi5wvgmd3fplz8sl7phqdlkpwjqww4x8nha6dk1dnczvam";
|
|
authors = [
|
|
"The Rust Project Developers"
|
|
];
|
|
features = {
|
|
"default" = [ "std" ];
|
|
"rustc-dep-of-std" = [ "align" "rustc-std-workspace-core" ];
|
|
"rustc-std-workspace-core" = [ "dep:rustc-std-workspace-core" ];
|
|
"use_std" = [ "std" ];
|
|
};
|
|
resolvedDefaultFeatures = [ "default" "extra_traits" "std" ];
|
|
};
|
|
"log" = rec {
|
|
crateName = "log";
|
|
version = "0.4.17";
|
|
edition = "2015";
|
|
sha256 = "0biqlaaw1lsr8bpnmbcc0fvgjj34yy79ghqzyi0ali7vgil2xcdb";
|
|
authors = [
|
|
"The Rust Project Developers"
|
|
];
|
|
dependencies = [
|
|
{
|
|
name = "cfg-if";
|
|
packageId = "cfg-if";
|
|
}
|
|
];
|
|
features = {
|
|
"kv_unstable" = [ "value-bag" ];
|
|
"kv_unstable_serde" = [ "kv_unstable_std" "value-bag/serde" "serde" ];
|
|
"kv_unstable_std" = [ "std" "kv_unstable" "value-bag/error" ];
|
|
"kv_unstable_sval" = [ "kv_unstable" "value-bag/sval" "sval" ];
|
|
"serde" = [ "dep:serde" ];
|
|
"sval" = [ "dep:sval" ];
|
|
"value-bag" = [ "dep:value-bag" ];
|
|
};
|
|
};
|
|
"nix" = rec {
|
|
crateName = "nix";
|
|
version = "0.20.0";
|
|
edition = "2018";
|
|
sha256 = "12n1syfd967hblrcrrqk63a4s1h4hsybfqwblh71rihvv8cli6zs";
|
|
authors = [
|
|
"The nix-rust Project Developers"
|
|
];
|
|
dependencies = [
|
|
{
|
|
name = "bitflags";
|
|
packageId = "bitflags";
|
|
}
|
|
{
|
|
name = "cfg-if";
|
|
packageId = "cfg-if";
|
|
}
|
|
{
|
|
name = "libc";
|
|
packageId = "libc";
|
|
features = [ "extra_traits" ];
|
|
}
|
|
];
|
|
buildDependencies = [
|
|
{
|
|
name = "cc";
|
|
packageId = "cc";
|
|
target = { target, features }: (target."os" == "dragonfly");
|
|
}
|
|
];
|
|
|
|
};
|
|
"nixos" = rec {
|
|
crateName = "nixos";
|
|
version = "0.1.0";
|
|
edition = "2021";
|
|
crateBin = [
|
|
{ name = "nixos"; path = "src/main.rs"; }
|
|
];
|
|
src = lib.cleanSourceWith { filter = sourceFilter; src = ./.; };
|
|
dependencies = [
|
|
{
|
|
name = "penrose";
|
|
packageId = "penrose";
|
|
}
|
|
];
|
|
|
|
};
|
|
"once_cell" = rec {
|
|
crateName = "once_cell";
|
|
version = "1.15.0";
|
|
edition = "2021";
|
|
sha256 = "1q9r8c0ls1qgjp89p4rd36sjv4671pz6710c106ajwcv2c2asbg8";
|
|
authors = [
|
|
"Aleksey Kladov <aleksey.kladov@gmail.com>"
|
|
];
|
|
features = {
|
|
"alloc" = [ "race" ];
|
|
"atomic-polyfill" = [ "dep:atomic-polyfill" ];
|
|
"default" = [ "std" ];
|
|
"parking_lot" = [ "parking_lot_core" ];
|
|
"parking_lot_core" = [ "dep:parking_lot_core" ];
|
|
"std" = [ "alloc" ];
|
|
};
|
|
resolvedDefaultFeatures = [ "alloc" "default" "race" "std" ];
|
|
};
|
|
"pango" = rec {
|
|
crateName = "pango";
|
|
version = "0.9.1";
|
|
edition = "2015";
|
|
sha256 = "0f64hynd9vq6966wb66mrg5kq9q371bkhncp37nqrgdyh22hcdwr";
|
|
authors = [
|
|
"The Gtk-rs Project Developers"
|
|
];
|
|
dependencies = [
|
|
{
|
|
name = "bitflags";
|
|
packageId = "bitflags";
|
|
}
|
|
{
|
|
name = "glib";
|
|
packageId = "glib";
|
|
}
|
|
{
|
|
name = "glib-sys";
|
|
packageId = "glib-sys";
|
|
}
|
|
{
|
|
name = "gobject-sys";
|
|
packageId = "gobject-sys";
|
|
}
|
|
{
|
|
name = "libc";
|
|
packageId = "libc";
|
|
}
|
|
{
|
|
name = "once_cell";
|
|
packageId = "once_cell";
|
|
}
|
|
{
|
|
name = "pango-sys";
|
|
packageId = "pango-sys";
|
|
}
|
|
];
|
|
features = {
|
|
"dox" = [ "pango-sys/dox" "glib/dox" ];
|
|
"embed-lgpl-docs" = [ "gtk-rs-lgpl-docs" ];
|
|
"gtk-rs-lgpl-docs" = [ "dep:gtk-rs-lgpl-docs" ];
|
|
"purge-lgpl-docs" = [ "gtk-rs-lgpl-docs" ];
|
|
"v1_38" = [ "pango-sys/v1_38" ];
|
|
"v1_40" = [ "v1_38" ];
|
|
"v1_42" = [ "v1_40" "pango-sys/v1_42" ];
|
|
"v1_44" = [ "v1_42" "pango-sys/v1_44" ];
|
|
};
|
|
};
|
|
"pango-sys" = rec {
|
|
crateName = "pango-sys";
|
|
version = "0.10.0";
|
|
edition = "2015";
|
|
sha256 = "1468xzyk2wanxb2b32fsmwk6bnafdaicxl5b4301dlb2ic66bli4";
|
|
libName = "pango_sys";
|
|
authors = [
|
|
"The Gtk-rs Project Developers"
|
|
];
|
|
dependencies = [
|
|
{
|
|
name = "glib-sys";
|
|
packageId = "glib-sys";
|
|
}
|
|
{
|
|
name = "gobject-sys";
|
|
packageId = "gobject-sys";
|
|
}
|
|
{
|
|
name = "libc";
|
|
packageId = "libc";
|
|
}
|
|
];
|
|
buildDependencies = [
|
|
{
|
|
name = "system-deps";
|
|
packageId = "system-deps";
|
|
}
|
|
];
|
|
features = {
|
|
"v1_38" = [ "v1_36_7" ];
|
|
"v1_42" = [ "v1_38" ];
|
|
"v1_44" = [ "v1_42" ];
|
|
};
|
|
};
|
|
"pangocairo" = rec {
|
|
crateName = "pangocairo";
|
|
version = "0.10.0";
|
|
edition = "2015";
|
|
sha256 = "10z8hlc82984nwvy5pnyh95ls9s5r1qrlkpn14zh4pjsl1ksxx80";
|
|
authors = [
|
|
"The Gtk-rs Project Developers"
|
|
];
|
|
dependencies = [
|
|
{
|
|
name = "bitflags";
|
|
packageId = "bitflags";
|
|
}
|
|
{
|
|
name = "cairo-rs";
|
|
packageId = "cairo-rs";
|
|
}
|
|
{
|
|
name = "cairo-sys-rs";
|
|
packageId = "cairo-sys-rs";
|
|
}
|
|
{
|
|
name = "glib";
|
|
packageId = "glib";
|
|
}
|
|
{
|
|
name = "glib-sys";
|
|
packageId = "glib-sys";
|
|
}
|
|
{
|
|
name = "gobject-sys";
|
|
packageId = "gobject-sys";
|
|
}
|
|
{
|
|
name = "libc";
|
|
packageId = "libc";
|
|
}
|
|
{
|
|
name = "pango";
|
|
packageId = "pango";
|
|
}
|
|
{
|
|
name = "pango-sys";
|
|
packageId = "pango-sys";
|
|
}
|
|
{
|
|
name = "pangocairo-sys";
|
|
packageId = "pangocairo-sys";
|
|
}
|
|
];
|
|
features = {
|
|
"dox" = [ "glib/dox" "pango/dox" "cairo-rs/dox" ];
|
|
"embed-lgpl-docs" = [ "gtk-rs-lgpl-docs" "cairo-rs/embed-lgpl-docs" ];
|
|
"gtk-rs-lgpl-docs" = [ "dep:gtk-rs-lgpl-docs" ];
|
|
"purge-lgpl-docs" = [ "gtk-rs-lgpl-docs" "cairo-rs/purge-lgpl-docs" ];
|
|
};
|
|
};
|
|
"pangocairo-sys" = rec {
|
|
crateName = "pangocairo-sys";
|
|
version = "0.11.0";
|
|
edition = "2015";
|
|
sha256 = "167b1z6ns3lw1dqfq3mnhmknf7isi5vacp2fp0rh4bwcd5zwkk4l";
|
|
libName = "pango_cairo_sys";
|
|
authors = [
|
|
"The Gtk-rs Project Developers"
|
|
];
|
|
dependencies = [
|
|
{
|
|
name = "cairo-sys-rs";
|
|
packageId = "cairo-sys-rs";
|
|
}
|
|
{
|
|
name = "glib-sys";
|
|
packageId = "glib-sys";
|
|
}
|
|
{
|
|
name = "libc";
|
|
packageId = "libc";
|
|
}
|
|
{
|
|
name = "pango-sys";
|
|
packageId = "pango-sys";
|
|
}
|
|
];
|
|
buildDependencies = [
|
|
{
|
|
name = "system-deps";
|
|
packageId = "system-deps";
|
|
}
|
|
];
|
|
features = { };
|
|
};
|
|
"penrose" = rec {
|
|
crateName = "penrose";
|
|
version = "0.2.1";
|
|
edition = "2021";
|
|
sha256 = "01mbzlwgfhcsdm1kjmm93p48ccj5ahvg8h0366blx100j19vm7n9";
|
|
authors = [
|
|
"sminez <innes.andersonmorrison@gmail.com>"
|
|
];
|
|
dependencies = [
|
|
{
|
|
name = "bitflags";
|
|
packageId = "bitflags";
|
|
}
|
|
{
|
|
name = "cairo-rs";
|
|
packageId = "cairo-rs";
|
|
optional = true;
|
|
features = [ "xcb" ];
|
|
}
|
|
{
|
|
name = "cairo-sys-rs";
|
|
packageId = "cairo-sys-rs";
|
|
optional = true;
|
|
}
|
|
{
|
|
name = "nix";
|
|
packageId = "nix";
|
|
}
|
|
{
|
|
name = "pango";
|
|
packageId = "pango";
|
|
optional = true;
|
|
}
|
|
{
|
|
name = "pangocairo";
|
|
packageId = "pangocairo";
|
|
optional = true;
|
|
}
|
|
{
|
|
name = "penrose_keysyms";
|
|
packageId = "penrose_keysyms";
|
|
optional = true;
|
|
}
|
|
{
|
|
name = "penrose_proc";
|
|
packageId = "penrose_proc";
|
|
}
|
|
{
|
|
name = "strum";
|
|
packageId = "strum 0.20.0";
|
|
features = [ "derive" ];
|
|
}
|
|
{
|
|
name = "strum_macros";
|
|
packageId = "strum_macros 0.20.1";
|
|
}
|
|
{
|
|
name = "thiserror";
|
|
packageId = "thiserror";
|
|
}
|
|
{
|
|
name = "tracing";
|
|
packageId = "tracing";
|
|
features = [ "attributes" "log" ];
|
|
}
|
|
{
|
|
name = "xcb";
|
|
packageId = "xcb";
|
|
optional = true;
|
|
features = [ "randr" ];
|
|
}
|
|
];
|
|
features = {
|
|
"cairo-rs" = [ "dep:cairo-rs" ];
|
|
"cairo-sys-rs" = [ "dep:cairo-sys-rs" ];
|
|
"default" = [ "xcb" "xcb_draw" "keysyms" ];
|
|
"keysyms" = [ "penrose_keysyms" ];
|
|
"pango" = [ "dep:pango" ];
|
|
"pangocairo" = [ "dep:pangocairo" ];
|
|
"penrose_keysyms" = [ "dep:penrose_keysyms" ];
|
|
"serde" = [ "dep:serde" ];
|
|
"x11rb" = [ "dep:x11rb" ];
|
|
"x11rb-xcb" = [ "x11rb" "x11rb/allow-unsafe-code" ];
|
|
"xcb" = [ "dep:xcb" ];
|
|
"xcb_draw" = [ "cairo-rs" "cairo-sys-rs" "pango" "pangocairo" ];
|
|
};
|
|
resolvedDefaultFeatures = [ "cairo-rs" "cairo-sys-rs" "default" "keysyms" "pango" "pangocairo" "penrose_keysyms" "xcb" "xcb_draw" ];
|
|
};
|
|
"penrose_keysyms" = rec {
|
|
crateName = "penrose_keysyms";
|
|
version = "0.1.1";
|
|
edition = "2018";
|
|
sha256 = "1mn2pri410892m2n5n1llwryma5fv0idfz99znqhnzixzvq4smvs";
|
|
authors = [
|
|
"IDAM <innes.andersonmorrison@gmail.com>"
|
|
];
|
|
dependencies = [
|
|
{
|
|
name = "strum";
|
|
packageId = "strum 0.20.0";
|
|
features = [ "derive" ];
|
|
}
|
|
{
|
|
name = "strum_macros";
|
|
packageId = "strum_macros 0.20.1";
|
|
}
|
|
];
|
|
|
|
};
|
|
"penrose_proc" = rec {
|
|
crateName = "penrose_proc";
|
|
version = "0.1.3";
|
|
edition = "2018";
|
|
sha256 = "1fgby4i5m2k04x5i81b7iwlyz52xnf5q7l4gs2xn7vfkw0w98kja";
|
|
procMacro = true;
|
|
authors = [
|
|
"IDAM <innes.andersonmorrison@gmail.com>"
|
|
];
|
|
dependencies = [
|
|
{
|
|
name = "penrose_keysyms";
|
|
packageId = "penrose_keysyms";
|
|
}
|
|
{
|
|
name = "proc-macro2";
|
|
packageId = "proc-macro2";
|
|
}
|
|
{
|
|
name = "quote";
|
|
packageId = "quote";
|
|
}
|
|
{
|
|
name = "rustversion";
|
|
packageId = "rustversion";
|
|
}
|
|
{
|
|
name = "strum";
|
|
packageId = "strum 0.20.0";
|
|
}
|
|
{
|
|
name = "syn";
|
|
packageId = "syn";
|
|
features = [ "fold" "full" ];
|
|
}
|
|
];
|
|
|
|
};
|
|
"pin-project-lite" = rec {
|
|
crateName = "pin-project-lite";
|
|
version = "0.2.9";
|
|
edition = "2018";
|
|
sha256 = "05n1z851l356hpgqadw4ar64mjanaxq1qlwqsf2k05ziq8xax9z0";
|
|
|
|
};
|
|
"pin-utils" = rec {
|
|
crateName = "pin-utils";
|
|
version = "0.1.0";
|
|
edition = "2018";
|
|
sha256 = "117ir7vslsl2z1a7qzhws4pd01cg2d3338c47swjyvqv2n60v1wb";
|
|
authors = [
|
|
"Josef Brandl <mail@josefbrandl.de>"
|
|
];
|
|
|
|
};
|
|
"pkg-config" = rec {
|
|
crateName = "pkg-config";
|
|
version = "0.3.25";
|
|
edition = "2015";
|
|
sha256 = "1bh3vij79cshj884py4can1f8rvk52niaii1vwxya9q69gnc9y0x";
|
|
authors = [
|
|
"Alex Crichton <alex@alexcrichton.com>"
|
|
];
|
|
|
|
};
|
|
"proc-macro-crate" = rec {
|
|
crateName = "proc-macro-crate";
|
|
version = "0.1.5";
|
|
edition = "2018";
|
|
sha256 = "11cpihdk9ba68hzw95aa8zxn0i5g6kdrfd4l2cy3d5jvb72a6vhx";
|
|
authors = [
|
|
"Bastian Köcher <git@kchr.de>"
|
|
];
|
|
dependencies = [
|
|
{
|
|
name = "toml";
|
|
packageId = "toml";
|
|
}
|
|
];
|
|
|
|
};
|
|
"proc-macro-error" = rec {
|
|
crateName = "proc-macro-error";
|
|
version = "1.0.4";
|
|
edition = "2018";
|
|
sha256 = "1373bhxaf0pagd8zkyd03kkx6bchzf6g0dkwrwzsnal9z47lj9fs";
|
|
authors = [
|
|
"CreepySkeleton <creepy-skeleton@yandex.ru>"
|
|
];
|
|
dependencies = [
|
|
{
|
|
name = "proc-macro-error-attr";
|
|
packageId = "proc-macro-error-attr";
|
|
}
|
|
{
|
|
name = "proc-macro2";
|
|
packageId = "proc-macro2";
|
|
}
|
|
{
|
|
name = "quote";
|
|
packageId = "quote";
|
|
}
|
|
{
|
|
name = "syn";
|
|
packageId = "syn";
|
|
optional = true;
|
|
usesDefaultFeatures = false;
|
|
}
|
|
];
|
|
buildDependencies = [
|
|
{
|
|
name = "version_check";
|
|
packageId = "version_check";
|
|
}
|
|
];
|
|
features = {
|
|
"default" = [ "syn-error" ];
|
|
"syn" = [ "dep:syn" ];
|
|
"syn-error" = [ "syn" ];
|
|
};
|
|
resolvedDefaultFeatures = [ "default" "syn" "syn-error" ];
|
|
};
|
|
"proc-macro-error-attr" = rec {
|
|
crateName = "proc-macro-error-attr";
|
|
version = "1.0.4";
|
|
edition = "2018";
|
|
sha256 = "0sgq6m5jfmasmwwy8x4mjygx5l7kp8s4j60bv25ckv2j1qc41gm1";
|
|
procMacro = true;
|
|
authors = [
|
|
"CreepySkeleton <creepy-skeleton@yandex.ru>"
|
|
];
|
|
dependencies = [
|
|
{
|
|
name = "proc-macro2";
|
|
packageId = "proc-macro2";
|
|
}
|
|
{
|
|
name = "quote";
|
|
packageId = "quote";
|
|
}
|
|
];
|
|
buildDependencies = [
|
|
{
|
|
name = "version_check";
|
|
packageId = "version_check";
|
|
}
|
|
];
|
|
|
|
};
|
|
"proc-macro2" = rec {
|
|
crateName = "proc-macro2";
|
|
version = "1.0.47";
|
|
edition = "2018";
|
|
sha256 = "09g7alc7mlbycsadfh7lwskr1qfxbiic9qp9z751cqz3n04dk8sy";
|
|
authors = [
|
|
"David Tolnay <dtolnay@gmail.com>"
|
|
"Alex Crichton <alex@alexcrichton.com>"
|
|
];
|
|
dependencies = [
|
|
{
|
|
name = "unicode-ident";
|
|
packageId = "unicode-ident";
|
|
}
|
|
];
|
|
features = {
|
|
"default" = [ "proc-macro" ];
|
|
};
|
|
resolvedDefaultFeatures = [ "default" "proc-macro" ];
|
|
};
|
|
"quote" = rec {
|
|
crateName = "quote";
|
|
version = "1.0.21";
|
|
edition = "2018";
|
|
sha256 = "0yai5cyd9h95n7hkwjcx8ig3yv0hindmz5gm60g9dmm7fzrlir5v";
|
|
authors = [
|
|
"David Tolnay <dtolnay@gmail.com>"
|
|
];
|
|
dependencies = [
|
|
{
|
|
name = "proc-macro2";
|
|
packageId = "proc-macro2";
|
|
usesDefaultFeatures = false;
|
|
}
|
|
];
|
|
features = {
|
|
"default" = [ "proc-macro" ];
|
|
"proc-macro" = [ "proc-macro2/proc-macro" ];
|
|
};
|
|
resolvedDefaultFeatures = [ "default" "proc-macro" ];
|
|
};
|
|
"rustversion" = rec {
|
|
crateName = "rustversion";
|
|
version = "1.0.9";
|
|
edition = "2018";
|
|
sha256 = "1a6nlrrnfbacn5pzg3m3311anhngcxs8kbvsbynh71ngni47wiwp";
|
|
procMacro = true;
|
|
build = "build/build.rs";
|
|
authors = [
|
|
"David Tolnay <dtolnay@gmail.com>"
|
|
];
|
|
|
|
};
|
|
"serde" = rec {
|
|
crateName = "serde";
|
|
version = "1.0.147";
|
|
edition = "2015";
|
|
sha256 = "0rc9jj8bbhf3lkf07ln8kyljigyzc4kk90nzg4dc2gwqmsdxd4yi";
|
|
authors = [
|
|
"Erick Tryzelaar <erick.tryzelaar@gmail.com>"
|
|
"David Tolnay <dtolnay@gmail.com>"
|
|
];
|
|
features = {
|
|
"default" = [ "std" ];
|
|
"derive" = [ "serde_derive" ];
|
|
"serde_derive" = [ "dep:serde_derive" ];
|
|
};
|
|
resolvedDefaultFeatures = [ "default" "std" ];
|
|
};
|
|
"slab" = rec {
|
|
crateName = "slab";
|
|
version = "0.4.7";
|
|
edition = "2018";
|
|
sha256 = "1vyw3rkdfdfkzfa1mh83s237sll8v5kazfwxma60bq4b59msf526";
|
|
authors = [
|
|
"Carl Lerche <me@carllerche.com>"
|
|
];
|
|
buildDependencies = [
|
|
{
|
|
name = "autocfg";
|
|
packageId = "autocfg";
|
|
}
|
|
];
|
|
features = {
|
|
"default" = [ "std" ];
|
|
"serde" = [ "dep:serde" ];
|
|
};
|
|
resolvedDefaultFeatures = [ "default" "std" ];
|
|
};
|
|
"strum 0.18.0" = rec {
|
|
crateName = "strum";
|
|
version = "0.18.0";
|
|
edition = "2015";
|
|
sha256 = "0asjskn1qhqqfiq673np0gvmnd1rsp506m38vk53gi7l93mq3gap";
|
|
authors = [
|
|
"Peter Glotfelty <peter.glotfelty@microsoft.com>"
|
|
];
|
|
features = {
|
|
"derive" = [ "strum_macros" ];
|
|
"strum_macros" = [ "dep:strum_macros" ];
|
|
};
|
|
};
|
|
"strum 0.20.0" = rec {
|
|
crateName = "strum";
|
|
version = "0.20.0";
|
|
edition = "2018";
|
|
sha256 = "0p5cslmdnz261kiwmm4h7qsmv9bh83r0f9lq6f2z2mxsnl4wa63k";
|
|
authors = [
|
|
"Peter Glotfelty <peter.glotfelty@microsoft.com>"
|
|
];
|
|
dependencies = [
|
|
{
|
|
name = "strum_macros";
|
|
packageId = "strum_macros 0.20.1";
|
|
optional = true;
|
|
}
|
|
];
|
|
devDependencies = [
|
|
{
|
|
name = "strum_macros";
|
|
packageId = "strum_macros 0.20.1";
|
|
}
|
|
];
|
|
features = {
|
|
"derive" = [ "strum_macros" ];
|
|
"strum_macros" = [ "dep:strum_macros" ];
|
|
};
|
|
resolvedDefaultFeatures = [ "derive" "strum_macros" ];
|
|
};
|
|
"strum_macros 0.18.0" = rec {
|
|
crateName = "strum_macros";
|
|
version = "0.18.0";
|
|
edition = "2015";
|
|
sha256 = "0k3pwbv0c8q00jnsjshzfc2d5r3y6ppgf9fz7pyknrgaz2immj47";
|
|
procMacro = true;
|
|
authors = [
|
|
"Peter Glotfelty <peter.glotfelty@microsoft.com>"
|
|
];
|
|
dependencies = [
|
|
{
|
|
name = "heck";
|
|
packageId = "heck";
|
|
}
|
|
{
|
|
name = "proc-macro2";
|
|
packageId = "proc-macro2";
|
|
}
|
|
{
|
|
name = "quote";
|
|
packageId = "quote";
|
|
}
|
|
{
|
|
name = "syn";
|
|
packageId = "syn";
|
|
features = [ "parsing" "extra-traits" ];
|
|
}
|
|
];
|
|
features = { };
|
|
};
|
|
"strum_macros 0.20.1" = rec {
|
|
crateName = "strum_macros";
|
|
version = "0.20.1";
|
|
edition = "2018";
|
|
sha256 = "0j9ikvxlqzr667ghc045qkpwprjgcfmzgagln7maw4jigawcd2zf";
|
|
procMacro = true;
|
|
authors = [
|
|
"Peter Glotfelty <peter.glotfelty@microsoft.com>"
|
|
];
|
|
dependencies = [
|
|
{
|
|
name = "heck";
|
|
packageId = "heck";
|
|
}
|
|
{
|
|
name = "proc-macro2";
|
|
packageId = "proc-macro2";
|
|
}
|
|
{
|
|
name = "quote";
|
|
packageId = "quote";
|
|
}
|
|
{
|
|
name = "syn";
|
|
packageId = "syn";
|
|
features = [ "parsing" "extra-traits" ];
|
|
}
|
|
];
|
|
features = { };
|
|
};
|
|
"syn" = rec {
|
|
crateName = "syn";
|
|
version = "1.0.103";
|
|
edition = "2018";
|
|
sha256 = "0pa4b6g938drphblgdhmjnzclp7gcbf4zdgkmfaxlfhk54i08r58";
|
|
authors = [
|
|
"David Tolnay <dtolnay@gmail.com>"
|
|
];
|
|
dependencies = [
|
|
{
|
|
name = "proc-macro2";
|
|
packageId = "proc-macro2";
|
|
usesDefaultFeatures = false;
|
|
}
|
|
{
|
|
name = "quote";
|
|
packageId = "quote";
|
|
optional = true;
|
|
usesDefaultFeatures = false;
|
|
}
|
|
{
|
|
name = "unicode-ident";
|
|
packageId = "unicode-ident";
|
|
}
|
|
];
|
|
features = {
|
|
"default" = [ "derive" "parsing" "printing" "clone-impls" "proc-macro" ];
|
|
"printing" = [ "quote" ];
|
|
"proc-macro" = [ "proc-macro2/proc-macro" "quote/proc-macro" ];
|
|
"quote" = [ "dep:quote" ];
|
|
"test" = [ "syn-test-suite/all-features" ];
|
|
};
|
|
resolvedDefaultFeatures = [ "clone-impls" "default" "derive" "extra-traits" "fold" "full" "parsing" "printing" "proc-macro" "quote" "visit" "visit-mut" ];
|
|
};
|
|
"system-deps" = rec {
|
|
crateName = "system-deps";
|
|
version = "1.3.2";
|
|
edition = "2018";
|
|
sha256 = "16v4ljmj8sj030mdcc1yk615vciqlyxi7csq6lxka6cs4qbwqghg";
|
|
authors = [
|
|
"Guillaume Desmottes <guillaume.desmottes@collabora.com>"
|
|
"Josh Triplett <josh@joshtriplett.org>"
|
|
];
|
|
dependencies = [
|
|
{
|
|
name = "heck";
|
|
packageId = "heck";
|
|
}
|
|
{
|
|
name = "pkg-config";
|
|
packageId = "pkg-config";
|
|
}
|
|
{
|
|
name = "strum";
|
|
packageId = "strum 0.18.0";
|
|
}
|
|
{
|
|
name = "strum_macros";
|
|
packageId = "strum_macros 0.18.0";
|
|
}
|
|
{
|
|
name = "thiserror";
|
|
packageId = "thiserror";
|
|
}
|
|
{
|
|
name = "toml";
|
|
packageId = "toml";
|
|
usesDefaultFeatures = false;
|
|
}
|
|
{
|
|
name = "version-compare";
|
|
packageId = "version-compare";
|
|
}
|
|
];
|
|
|
|
};
|
|
"thiserror" = rec {
|
|
crateName = "thiserror";
|
|
version = "1.0.37";
|
|
edition = "2018";
|
|
sha256 = "0gky83x4i87gd87w3fknnp920wvk9yycp7dgkf5h3jg364vb7phh";
|
|
authors = [
|
|
"David Tolnay <dtolnay@gmail.com>"
|
|
];
|
|
dependencies = [
|
|
{
|
|
name = "thiserror-impl";
|
|
packageId = "thiserror-impl";
|
|
}
|
|
];
|
|
|
|
};
|
|
"thiserror-impl" = rec {
|
|
crateName = "thiserror-impl";
|
|
version = "1.0.37";
|
|
edition = "2018";
|
|
sha256 = "1fydmpksd14x1mkc24zas01qjssz8q43sbn2ywl6n527dda1fbcq";
|
|
procMacro = true;
|
|
authors = [
|
|
"David Tolnay <dtolnay@gmail.com>"
|
|
];
|
|
dependencies = [
|
|
{
|
|
name = "proc-macro2";
|
|
packageId = "proc-macro2";
|
|
}
|
|
{
|
|
name = "quote";
|
|
packageId = "quote";
|
|
}
|
|
{
|
|
name = "syn";
|
|
packageId = "syn";
|
|
}
|
|
];
|
|
|
|
};
|
|
"toml" = rec {
|
|
crateName = "toml";
|
|
version = "0.5.9";
|
|
edition = "2018";
|
|
sha256 = "1mr40c0x3ma0dbzh4v43bfn4sj3k9ihpgq6fz1js88l6fnky30ld";
|
|
authors = [
|
|
"Alex Crichton <alex@alexcrichton.com>"
|
|
];
|
|
dependencies = [
|
|
{
|
|
name = "serde";
|
|
packageId = "serde";
|
|
}
|
|
];
|
|
features = {
|
|
"indexmap" = [ "dep:indexmap" ];
|
|
"preserve_order" = [ "indexmap" ];
|
|
};
|
|
resolvedDefaultFeatures = [ "default" ];
|
|
};
|
|
"tracing" = rec {
|
|
crateName = "tracing";
|
|
version = "0.1.37";
|
|
edition = "2018";
|
|
sha256 = "1f2fylc79xmbh7v53kak6qyw27njbx227rd64kb4bga8ilxc7s4c";
|
|
authors = [
|
|
"Eliza Weisman <eliza@buoyant.io>"
|
|
"Tokio Contributors <team@tokio.rs>"
|
|
];
|
|
dependencies = [
|
|
{
|
|
name = "cfg-if";
|
|
packageId = "cfg-if";
|
|
}
|
|
{
|
|
name = "log";
|
|
packageId = "log";
|
|
optional = true;
|
|
}
|
|
{
|
|
name = "pin-project-lite";
|
|
packageId = "pin-project-lite";
|
|
}
|
|
{
|
|
name = "tracing-attributes";
|
|
packageId = "tracing-attributes";
|
|
optional = true;
|
|
}
|
|
{
|
|
name = "tracing-core";
|
|
packageId = "tracing-core";
|
|
usesDefaultFeatures = false;
|
|
}
|
|
];
|
|
devDependencies = [
|
|
{
|
|
name = "log";
|
|
packageId = "log";
|
|
}
|
|
];
|
|
features = {
|
|
"attributes" = [ "tracing-attributes" ];
|
|
"default" = [ "std" "attributes" ];
|
|
"log" = [ "dep:log" ];
|
|
"log-always" = [ "log" ];
|
|
"std" = [ "tracing-core/std" ];
|
|
"tracing-attributes" = [ "dep:tracing-attributes" ];
|
|
"valuable" = [ "tracing-core/valuable" ];
|
|
};
|
|
resolvedDefaultFeatures = [ "attributes" "default" "log" "std" "tracing-attributes" ];
|
|
};
|
|
"tracing-attributes" = rec {
|
|
crateName = "tracing-attributes";
|
|
version = "0.1.23";
|
|
edition = "2018";
|
|
sha256 = "06h80cy0i1kilvnj8j9dw2kcfwbwj49n2s3jwskhr1rra7sgh5s0";
|
|
procMacro = true;
|
|
authors = [
|
|
"Tokio Contributors <team@tokio.rs>"
|
|
"Eliza Weisman <eliza@buoyant.io>"
|
|
"David Barsky <dbarsky@amazon.com>"
|
|
];
|
|
dependencies = [
|
|
{
|
|
name = "proc-macro2";
|
|
packageId = "proc-macro2";
|
|
}
|
|
{
|
|
name = "quote";
|
|
packageId = "quote";
|
|
}
|
|
{
|
|
name = "syn";
|
|
packageId = "syn";
|
|
usesDefaultFeatures = false;
|
|
features = [ "full" "parsing" "printing" "visit" "visit-mut" "clone-impls" "extra-traits" "proc-macro" ];
|
|
}
|
|
];
|
|
features = { };
|
|
};
|
|
"tracing-core" = rec {
|
|
crateName = "tracing-core";
|
|
version = "0.1.30";
|
|
edition = "2018";
|
|
sha256 = "0fi1jz3jbzk3n7k379pwv3wfhn35c5gcwn000m2xh7xb1sx07sr4";
|
|
authors = [
|
|
"Tokio Contributors <team@tokio.rs>"
|
|
];
|
|
dependencies = [
|
|
{
|
|
name = "once_cell";
|
|
packageId = "once_cell";
|
|
optional = true;
|
|
}
|
|
];
|
|
features = {
|
|
"default" = [ "std" "valuable/std" ];
|
|
"once_cell" = [ "dep:once_cell" ];
|
|
"std" = [ "once_cell" ];
|
|
"valuable" = [ "dep:valuable" ];
|
|
};
|
|
resolvedDefaultFeatures = [ "once_cell" "std" ];
|
|
};
|
|
"unicode-ident" = rec {
|
|
crateName = "unicode-ident";
|
|
version = "1.0.5";
|
|
edition = "2018";
|
|
sha256 = "1wznr6ax3jl09vxkvj4a62vip2avfgif13js9sflkjg4b6fv7skc";
|
|
authors = [
|
|
"David Tolnay <dtolnay@gmail.com>"
|
|
];
|
|
|
|
};
|
|
"unicode-segmentation" = rec {
|
|
crateName = "unicode-segmentation";
|
|
version = "1.10.0";
|
|
edition = "2018";
|
|
sha256 = "0nks0izrlfrc26hkbs3v3rdjk7lkrflffv2ajhgf0gbql19g1nqg";
|
|
authors = [
|
|
"kwantam <kwantam@gmail.com>"
|
|
"Manish Goregaokar <manishsmail@gmail.com>"
|
|
];
|
|
features = { };
|
|
};
|
|
"version-compare" = rec {
|
|
crateName = "version-compare";
|
|
version = "0.0.10";
|
|
edition = "2018";
|
|
sha256 = "18ack6rx18rp700h1dncljmpzchs3p2dfh76a8ds6vmfbfi5cdfn";
|
|
authors = [
|
|
"timvisee <timvisee@gmail.com>"
|
|
];
|
|
features = { };
|
|
resolvedDefaultFeatures = [ "default" ];
|
|
};
|
|
"version_check" = rec {
|
|
crateName = "version_check";
|
|
version = "0.9.4";
|
|
edition = "2015";
|
|
sha256 = "0gs8grwdlgh0xq660d7wr80x14vxbizmd8dbp29p2pdncx8lp1s9";
|
|
authors = [
|
|
"Sergio Benitez <sb@sergio.bz>"
|
|
];
|
|
|
|
};
|
|
"xcb" = rec {
|
|
crateName = "xcb";
|
|
version = "0.9.0";
|
|
edition = "2015";
|
|
sha256 = "19i2pm8alpn2f0m4jg8bsw6ckw8irj1wjh55h9pi2fcb2diny1b2";
|
|
authors = [
|
|
"Remi Thebault <remi.thebault@gmail.com>"
|
|
];
|
|
dependencies = [
|
|
{
|
|
name = "libc";
|
|
packageId = "libc";
|
|
}
|
|
{
|
|
name = "log";
|
|
packageId = "log";
|
|
}
|
|
];
|
|
buildDependencies = [
|
|
{
|
|
name = "libc";
|
|
packageId = "libc";
|
|
}
|
|
];
|
|
features = {
|
|
"composite" = [ "xfixes" ];
|
|
"damage" = [ "xfixes" ];
|
|
"debug_all" = [ "thread" "composite" "damage" "dpms" "dri2" "dri3" "glx" "randr" "record" "render" "res" "screensaver" "shape" "shm" "xevie" "xf86dri" "xfixes" "xinerama" "xkb" "xprint" "xselinux" "xtest" "xvmc" "xv" "xlib_xcb" ];
|
|
"present" = [ "render" "xfixes" "sync" ];
|
|
"randr" = [ "render" ];
|
|
"x11" = [ "dep:x11" ];
|
|
"xfixes" = [ "render" "shape" ];
|
|
"xinput" = [ "xfixes" ];
|
|
"xlib_xcb" = [ "x11/xlib" ];
|
|
"xv" = [ "shm" ];
|
|
"xvmc" = [ "xv" ];
|
|
};
|
|
resolvedDefaultFeatures = [ "randr" "render" ];
|
|
};
|
|
};
|
|
|
|
#
|
|
# crate2nix/default.nix (excerpt start)
|
|
#
|
|
|
|
/* Target (platform) data for conditional dependencies.
|
|
This corresponds roughly to what buildRustCrate is setting.
|
|
*/
|
|
defaultTarget = {
|
|
unix = true;
|
|
windows = false;
|
|
fuchsia = true;
|
|
test = false;
|
|
|
|
# This doesn't appear to be officially documented anywhere yet.
|
|
# See https://github.com/rust-lang-nursery/rust-forge/issues/101.
|
|
os =
|
|
if stdenv.hostPlatform.isDarwin
|
|
then "macos"
|
|
else stdenv.hostPlatform.parsed.kernel.name;
|
|
arch = stdenv.hostPlatform.parsed.cpu.name;
|
|
family = "unix";
|
|
env = "gnu";
|
|
endian =
|
|
if stdenv.hostPlatform.parsed.cpu.significantByte.name == "littleEndian"
|
|
then "little" else "big";
|
|
pointer_width = toString stdenv.hostPlatform.parsed.cpu.bits;
|
|
vendor = stdenv.hostPlatform.parsed.vendor.name;
|
|
debug_assertions = false;
|
|
};
|
|
|
|
/* Filters common temp files and build files. */
|
|
# TODO(pkolloch): Substitute with gitignore filter
|
|
sourceFilter = name: type:
|
|
let
|
|
baseName = builtins.baseNameOf (builtins.toString name);
|
|
in
|
|
! (
|
|
# Filter out git
|
|
baseName == ".gitignore"
|
|
|| (type == "directory" && baseName == ".git")
|
|
|
|
# Filter out build results
|
|
|| (
|
|
type == "directory" && (
|
|
baseName == "target"
|
|
|| baseName == "_site"
|
|
|| baseName == ".sass-cache"
|
|
|| baseName == ".jekyll-metadata"
|
|
|| baseName == "build-artifacts"
|
|
)
|
|
)
|
|
|
|
# Filter out nix-build result symlinks
|
|
|| (
|
|
type == "symlink" && lib.hasPrefix "result" baseName
|
|
)
|
|
|
|
# Filter out IDE config
|
|
|| (
|
|
type == "directory" && (
|
|
baseName == ".idea" || baseName == ".vscode"
|
|
)
|
|
) || lib.hasSuffix ".iml" baseName
|
|
|
|
# Filter out nix build files
|
|
|| baseName == "Cargo.nix"
|
|
|
|
# Filter out editor backup / swap files.
|
|
|| lib.hasSuffix "~" baseName
|
|
|| builtins.match "^\\.sw[a-z]$$" baseName != null
|
|
|| builtins.match "^\\..*\\.sw[a-z]$$" baseName != null
|
|
|| lib.hasSuffix ".tmp" baseName
|
|
|| lib.hasSuffix ".bak" baseName
|
|
|| baseName == "tests.nix"
|
|
);
|
|
|
|
/* Returns a crate which depends on successful test execution
|
|
of crate given as the second argument.
|
|
|
|
testCrateFlags: list of flags to pass to the test exectuable
|
|
testInputs: list of packages that should be available during test execution
|
|
*/
|
|
crateWithTest = { crate, testCrate, testCrateFlags, testInputs, testPreRun, testPostRun }:
|
|
assert builtins.typeOf testCrateFlags == "list";
|
|
assert builtins.typeOf testInputs == "list";
|
|
assert builtins.typeOf testPreRun == "string";
|
|
assert builtins.typeOf testPostRun == "string";
|
|
let
|
|
# override the `crate` so that it will build and execute tests instead of
|
|
# building the actual lib and bin targets We just have to pass `--test`
|
|
# to rustc and it will do the right thing. We execute the tests and copy
|
|
# their log and the test executables to $out for later inspection.
|
|
test =
|
|
let
|
|
drv = testCrate.override
|
|
(
|
|
_: {
|
|
buildTests = true;
|
|
}
|
|
);
|
|
# If the user hasn't set any pre/post commands, we don't want to
|
|
# insert empty lines. This means that any existing users of crate2nix
|
|
# don't get a spurious rebuild unless they set these explicitly.
|
|
testCommand = pkgs.lib.concatStringsSep "\n"
|
|
(pkgs.lib.filter (s: s != "") [
|
|
testPreRun
|
|
"$f $testCrateFlags 2>&1 | tee -a $out"
|
|
testPostRun
|
|
]);
|
|
in
|
|
pkgs.runCommand "run-tests-${testCrate.name}"
|
|
{
|
|
inherit testCrateFlags;
|
|
buildInputs = testInputs;
|
|
} ''
|
|
set -ex
|
|
|
|
export RUST_BACKTRACE=1
|
|
|
|
# recreate a file hierarchy as when running tests with cargo
|
|
|
|
# the source for test data
|
|
${pkgs.xorg.lndir}/bin/lndir ${crate.src}
|
|
|
|
# build outputs
|
|
testRoot=target/debug
|
|
mkdir -p $testRoot
|
|
|
|
# executables of the crate
|
|
# we copy to prevent std::env::current_exe() to resolve to a store location
|
|
for i in ${crate}/bin/*; do
|
|
cp "$i" "$testRoot"
|
|
done
|
|
chmod +w -R .
|
|
|
|
# test harness executables are suffixed with a hash, like cargo does
|
|
# this allows to prevent name collision with the main
|
|
# executables of the crate
|
|
hash=$(basename $out)
|
|
for file in ${drv}/tests/*; do
|
|
f=$testRoot/$(basename $file)-$hash
|
|
cp $file $f
|
|
${testCommand}
|
|
done
|
|
'';
|
|
in
|
|
pkgs.runCommand "${crate.name}-linked"
|
|
{
|
|
inherit (crate) outputs crateName;
|
|
passthru = (crate.passthru or { }) // {
|
|
inherit test;
|
|
};
|
|
} ''
|
|
echo tested by ${test}
|
|
${lib.concatMapStringsSep "\n" (output: "ln -s ${crate.${output}} ${"$"}${output}") crate.outputs}
|
|
'';
|
|
|
|
/* A restricted overridable version of builtRustCratesWithFeatures. */
|
|
buildRustCrateWithFeatures =
|
|
{ packageId
|
|
, features ? rootFeatures
|
|
, crateOverrides ? defaultCrateOverrides
|
|
, buildRustCrateForPkgsFunc ? null
|
|
, runTests ? false
|
|
, testCrateFlags ? [ ]
|
|
, testInputs ? [ ]
|
|
# Any command to run immediatelly before a test is executed.
|
|
, testPreRun ? ""
|
|
# Any command run immediatelly after a test is executed.
|
|
, testPostRun ? ""
|
|
}:
|
|
lib.makeOverridable
|
|
(
|
|
{ features
|
|
, crateOverrides
|
|
, runTests
|
|
, testCrateFlags
|
|
, testInputs
|
|
, testPreRun
|
|
, testPostRun
|
|
}:
|
|
let
|
|
buildRustCrateForPkgsFuncOverriden =
|
|
if buildRustCrateForPkgsFunc != null
|
|
then buildRustCrateForPkgsFunc
|
|
else
|
|
(
|
|
if crateOverrides == pkgs.defaultCrateOverrides
|
|
then buildRustCrateForPkgs
|
|
else
|
|
pkgs: (buildRustCrateForPkgs pkgs).override {
|
|
defaultCrateOverrides = crateOverrides;
|
|
}
|
|
);
|
|
builtRustCrates = builtRustCratesWithFeatures {
|
|
inherit packageId features;
|
|
buildRustCrateForPkgsFunc = buildRustCrateForPkgsFuncOverriden;
|
|
runTests = false;
|
|
};
|
|
builtTestRustCrates = builtRustCratesWithFeatures {
|
|
inherit packageId features;
|
|
buildRustCrateForPkgsFunc = buildRustCrateForPkgsFuncOverriden;
|
|
runTests = true;
|
|
};
|
|
drv = builtRustCrates.crates.${packageId};
|
|
testDrv = builtTestRustCrates.crates.${packageId};
|
|
derivation =
|
|
if runTests then
|
|
crateWithTest
|
|
{
|
|
crate = drv;
|
|
testCrate = testDrv;
|
|
inherit testCrateFlags testInputs testPreRun testPostRun;
|
|
}
|
|
else drv;
|
|
in
|
|
derivation
|
|
)
|
|
{ inherit features crateOverrides runTests testCrateFlags testInputs testPreRun testPostRun; };
|
|
|
|
/* Returns an attr set with packageId mapped to the result of buildRustCrateForPkgsFunc
|
|
for the corresponding crate.
|
|
*/
|
|
builtRustCratesWithFeatures =
|
|
{ packageId
|
|
, features
|
|
, crateConfigs ? crates
|
|
, buildRustCrateForPkgsFunc
|
|
, runTests
|
|
, target ? defaultTarget
|
|
} @ args:
|
|
assert (builtins.isAttrs crateConfigs);
|
|
assert (builtins.isString packageId);
|
|
assert (builtins.isList features);
|
|
assert (builtins.isAttrs target);
|
|
assert (builtins.isBool runTests);
|
|
let
|
|
rootPackageId = packageId;
|
|
mergedFeatures = mergePackageFeatures
|
|
(
|
|
args // {
|
|
inherit rootPackageId;
|
|
target = target // { test = runTests; };
|
|
}
|
|
);
|
|
# Memoize built packages so that reappearing packages are only built once.
|
|
builtByPackageIdByPkgs = mkBuiltByPackageIdByPkgs pkgs;
|
|
mkBuiltByPackageIdByPkgs = pkgs:
|
|
let
|
|
self = {
|
|
crates = lib.mapAttrs (packageId: value: buildByPackageIdForPkgsImpl self pkgs packageId) crateConfigs;
|
|
build = mkBuiltByPackageIdByPkgs pkgs.buildPackages;
|
|
};
|
|
in
|
|
self;
|
|
buildByPackageIdForPkgsImpl = self: pkgs: packageId:
|
|
let
|
|
features = mergedFeatures."${packageId}" or [ ];
|
|
crateConfig' = crateConfigs."${packageId}";
|
|
crateConfig =
|
|
builtins.removeAttrs crateConfig' [ "resolvedDefaultFeatures" "devDependencies" ];
|
|
devDependencies =
|
|
lib.optionals
|
|
(runTests && packageId == rootPackageId)
|
|
(crateConfig'.devDependencies or [ ]);
|
|
dependencies =
|
|
dependencyDerivations {
|
|
inherit features target;
|
|
buildByPackageId = depPackageId:
|
|
# proc_macro crates must be compiled for the build architecture
|
|
if crateConfigs.${depPackageId}.procMacro or false
|
|
then self.build.crates.${depPackageId}
|
|
else self.crates.${depPackageId};
|
|
dependencies =
|
|
(crateConfig.dependencies or [ ])
|
|
++ devDependencies;
|
|
};
|
|
buildDependencies =
|
|
dependencyDerivations {
|
|
inherit features target;
|
|
buildByPackageId = depPackageId:
|
|
self.build.crates.${depPackageId};
|
|
dependencies = crateConfig.buildDependencies or [ ];
|
|
};
|
|
filterEnabledDependenciesForThis = dependencies: filterEnabledDependencies {
|
|
inherit dependencies features target;
|
|
};
|
|
dependenciesWithRenames =
|
|
lib.filter (d: d ? "rename")
|
|
(
|
|
filterEnabledDependenciesForThis
|
|
(
|
|
(crateConfig.buildDependencies or [ ])
|
|
++ (crateConfig.dependencies or [ ])
|
|
++ devDependencies
|
|
)
|
|
);
|
|
# Crate renames have the form:
|
|
#
|
|
# {
|
|
# crate_name = [
|
|
# { version = "1.2.3"; rename = "crate_name01"; }
|
|
# ];
|
|
# # ...
|
|
# }
|
|
crateRenames =
|
|
let
|
|
grouped =
|
|
lib.groupBy
|
|
(dependency: dependency.name)
|
|
dependenciesWithRenames;
|
|
versionAndRename = dep:
|
|
let
|
|
package = crateConfigs."${dep.packageId}";
|
|
in
|
|
{ inherit (dep) rename; version = package.version; };
|
|
in
|
|
lib.mapAttrs (name: choices: builtins.map versionAndRename choices) grouped;
|
|
in
|
|
buildRustCrateForPkgsFunc pkgs
|
|
(
|
|
crateConfig // {
|
|
src = crateConfig.src or (
|
|
pkgs.fetchurl rec {
|
|
name = "${crateConfig.crateName}-${crateConfig.version}.tar.gz";
|
|
# https://www.pietroalbini.org/blog/downloading-crates-io/
|
|
# Not rate-limited, CDN URL.
|
|
url = "https://static.crates.io/crates/${crateConfig.crateName}/${crateConfig.crateName}-${crateConfig.version}.crate";
|
|
sha256 =
|
|
assert (lib.assertMsg (crateConfig ? sha256) "Missing sha256 for ${name}");
|
|
crateConfig.sha256;
|
|
}
|
|
);
|
|
extraRustcOpts = lib.lists.optional (targetFeatures != [ ]) "-C target-feature=${lib.concatMapStringsSep "," (x: "+${x}") targetFeatures}";
|
|
inherit features dependencies buildDependencies crateRenames release;
|
|
}
|
|
);
|
|
in
|
|
builtByPackageIdByPkgs;
|
|
|
|
/* Returns the actual derivations for the given dependencies. */
|
|
dependencyDerivations =
|
|
{ buildByPackageId
|
|
, features
|
|
, dependencies
|
|
, target
|
|
}:
|
|
assert (builtins.isList features);
|
|
assert (builtins.isList dependencies);
|
|
assert (builtins.isAttrs target);
|
|
let
|
|
enabledDependencies = filterEnabledDependencies {
|
|
inherit dependencies features target;
|
|
};
|
|
depDerivation = dependency: buildByPackageId dependency.packageId;
|
|
in
|
|
map depDerivation enabledDependencies;
|
|
|
|
/* Returns a sanitized version of val with all values substituted that cannot
|
|
be serialized as JSON.
|
|
*/
|
|
sanitizeForJson = val:
|
|
if builtins.isAttrs val
|
|
then lib.mapAttrs (n: v: sanitizeForJson v) val
|
|
else if builtins.isList val
|
|
then builtins.map sanitizeForJson val
|
|
else if builtins.isFunction val
|
|
then "function"
|
|
else val;
|
|
|
|
/* Returns various tools to debug a crate. */
|
|
debugCrate = { packageId, target ? defaultTarget }:
|
|
assert (builtins.isString packageId);
|
|
let
|
|
debug = rec {
|
|
# The built tree as passed to buildRustCrate.
|
|
buildTree = buildRustCrateWithFeatures {
|
|
buildRustCrateForPkgsFunc = _: lib.id;
|
|
inherit packageId;
|
|
};
|
|
sanitizedBuildTree = sanitizeForJson buildTree;
|
|
dependencyTree = sanitizeForJson
|
|
(
|
|
buildRustCrateWithFeatures {
|
|
buildRustCrateForPkgsFunc = _: crate: {
|
|
"01_crateName" = crate.crateName or false;
|
|
"02_features" = crate.features or [ ];
|
|
"03_dependencies" = crate.dependencies or [ ];
|
|
};
|
|
inherit packageId;
|
|
}
|
|
);
|
|
mergedPackageFeatures = mergePackageFeatures {
|
|
features = rootFeatures;
|
|
inherit packageId target;
|
|
};
|
|
diffedDefaultPackageFeatures = diffDefaultPackageFeatures {
|
|
inherit packageId target;
|
|
};
|
|
};
|
|
in
|
|
{ internal = debug; };
|
|
|
|
/* Returns differences between cargo default features and crate2nix default
|
|
features.
|
|
|
|
This is useful for verifying the feature resolution in crate2nix.
|
|
*/
|
|
diffDefaultPackageFeatures =
|
|
{ crateConfigs ? crates
|
|
, packageId
|
|
, target
|
|
}:
|
|
assert (builtins.isAttrs crateConfigs);
|
|
let
|
|
prefixValues = prefix: lib.mapAttrs (n: v: { "${prefix}" = v; });
|
|
mergedFeatures =
|
|
prefixValues
|
|
"crate2nix"
|
|
(mergePackageFeatures { inherit crateConfigs packageId target; features = [ "default" ]; });
|
|
configs = prefixValues "cargo" crateConfigs;
|
|
combined = lib.foldAttrs (a: b: a // b) { } [ mergedFeatures configs ];
|
|
onlyInCargo =
|
|
builtins.attrNames
|
|
(lib.filterAttrs (n: v: !(v ? "crate2nix") && (v ? "cargo")) combined);
|
|
onlyInCrate2Nix =
|
|
builtins.attrNames
|
|
(lib.filterAttrs (n: v: (v ? "crate2nix") && !(v ? "cargo")) combined);
|
|
differentFeatures = lib.filterAttrs
|
|
(
|
|
n: v:
|
|
(v ? "crate2nix")
|
|
&& (v ? "cargo")
|
|
&& (v.crate2nix.features or [ ]) != (v."cargo".resolved_default_features or [ ])
|
|
)
|
|
combined;
|
|
in
|
|
builtins.toJSON {
|
|
inherit onlyInCargo onlyInCrate2Nix differentFeatures;
|
|
};
|
|
|
|
/* Returns an attrset mapping packageId to the list of enabled features.
|
|
|
|
If multiple paths to a dependency enable different features, the
|
|
corresponding feature sets are merged. Features in rust are additive.
|
|
*/
|
|
mergePackageFeatures =
|
|
{ crateConfigs ? crates
|
|
, packageId
|
|
, rootPackageId ? packageId
|
|
, features ? rootFeatures
|
|
, dependencyPath ? [ crates.${packageId}.crateName ]
|
|
, featuresByPackageId ? { }
|
|
, target
|
|
# Adds devDependencies to the crate with rootPackageId.
|
|
, runTests ? false
|
|
, ...
|
|
} @ args:
|
|
assert (builtins.isAttrs crateConfigs);
|
|
assert (builtins.isString packageId);
|
|
assert (builtins.isString rootPackageId);
|
|
assert (builtins.isList features);
|
|
assert (builtins.isList dependencyPath);
|
|
assert (builtins.isAttrs featuresByPackageId);
|
|
assert (builtins.isAttrs target);
|
|
assert (builtins.isBool runTests);
|
|
let
|
|
crateConfig = crateConfigs."${packageId}" or (builtins.throw "Package not found: ${packageId}");
|
|
expandedFeatures = expandFeatures (crateConfig.features or { }) features;
|
|
enabledFeatures = enableFeatures (crateConfig.dependencies or [ ]) expandedFeatures;
|
|
depWithResolvedFeatures = dependency:
|
|
let
|
|
packageId = dependency.packageId;
|
|
features = dependencyFeatures enabledFeatures dependency;
|
|
in
|
|
{ inherit packageId features; };
|
|
resolveDependencies = cache: path: dependencies:
|
|
assert (builtins.isAttrs cache);
|
|
assert (builtins.isList dependencies);
|
|
let
|
|
enabledDependencies = filterEnabledDependencies {
|
|
inherit dependencies target;
|
|
features = enabledFeatures;
|
|
};
|
|
directDependencies = map depWithResolvedFeatures enabledDependencies;
|
|
foldOverCache = op: lib.foldl op cache directDependencies;
|
|
in
|
|
foldOverCache
|
|
(
|
|
cache: { packageId, features }:
|
|
let
|
|
cacheFeatures = cache.${packageId} or [ ];
|
|
combinedFeatures = sortedUnique (cacheFeatures ++ features);
|
|
in
|
|
if cache ? ${packageId} && cache.${packageId} == combinedFeatures
|
|
then cache
|
|
else
|
|
mergePackageFeatures {
|
|
features = combinedFeatures;
|
|
featuresByPackageId = cache;
|
|
inherit crateConfigs packageId target runTests rootPackageId;
|
|
}
|
|
);
|
|
cacheWithSelf =
|
|
let
|
|
cacheFeatures = featuresByPackageId.${packageId} or [ ];
|
|
combinedFeatures = sortedUnique (cacheFeatures ++ enabledFeatures);
|
|
in
|
|
featuresByPackageId // {
|
|
"${packageId}" = combinedFeatures;
|
|
};
|
|
cacheWithDependencies =
|
|
resolveDependencies cacheWithSelf "dep"
|
|
(
|
|
crateConfig.dependencies or [ ]
|
|
++ lib.optionals
|
|
(runTests && packageId == rootPackageId)
|
|
(crateConfig.devDependencies or [ ])
|
|
);
|
|
cacheWithAll =
|
|
resolveDependencies
|
|
cacheWithDependencies "build"
|
|
(crateConfig.buildDependencies or [ ]);
|
|
in
|
|
cacheWithAll;
|
|
|
|
/* Returns the enabled dependencies given the enabled features. */
|
|
filterEnabledDependencies = { dependencies, features, target }:
|
|
assert (builtins.isList dependencies);
|
|
assert (builtins.isList features);
|
|
assert (builtins.isAttrs target);
|
|
|
|
lib.filter
|
|
(
|
|
dep:
|
|
let
|
|
targetFunc = dep.target or (features: true);
|
|
in
|
|
targetFunc { inherit features target; }
|
|
&& (
|
|
!(dep.optional or false)
|
|
|| builtins.any (doesFeatureEnableDependency dep) features
|
|
)
|
|
)
|
|
dependencies;
|
|
|
|
/* Returns whether the given feature should enable the given dependency. */
|
|
doesFeatureEnableDependency = { name, rename ? null, ... }: feature:
|
|
let
|
|
prefix = "${name}/";
|
|
len = builtins.stringLength prefix;
|
|
startsWithPrefix = builtins.substring 0 len feature == prefix;
|
|
in
|
|
(rename == null && feature == name)
|
|
|| (rename != null && rename == feature)
|
|
|| startsWithPrefix;
|
|
|
|
/* Returns the expanded features for the given inputFeatures by applying the
|
|
rules in featureMap.
|
|
|
|
featureMap is an attribute set which maps feature names to lists of further
|
|
feature names to enable in case this feature is selected.
|
|
*/
|
|
expandFeatures = featureMap: inputFeatures:
|
|
assert (builtins.isAttrs featureMap);
|
|
assert (builtins.isList inputFeatures);
|
|
let
|
|
expandFeature = feature:
|
|
assert (builtins.isString feature);
|
|
[ feature ] ++ (expandFeatures featureMap (featureMap."${feature}" or [ ]));
|
|
outFeatures = lib.concatMap expandFeature inputFeatures;
|
|
in
|
|
sortedUnique outFeatures;
|
|
|
|
/* This function adds optional dependencies as features if they are enabled
|
|
indirectly by dependency features. This function mimics Cargo's behavior
|
|
described in a note at:
|
|
https://doc.rust-lang.org/nightly/cargo/reference/features.html#dependency-features
|
|
*/
|
|
enableFeatures = dependencies: features:
|
|
assert (builtins.isList features);
|
|
assert (builtins.isList dependencies);
|
|
let
|
|
additionalFeatures = lib.concatMap
|
|
(
|
|
dependency:
|
|
assert (builtins.isAttrs dependency);
|
|
let
|
|
enabled = builtins.any (doesFeatureEnableDependency dependency) features;
|
|
in
|
|
if (dependency.optional or false) && enabled then [ dependency.name ] else [ ]
|
|
)
|
|
dependencies;
|
|
in
|
|
sortedUnique (features ++ additionalFeatures);
|
|
|
|
/*
|
|
Returns the actual features for the given dependency.
|
|
|
|
features: The features of the crate that refers this dependency.
|
|
*/
|
|
dependencyFeatures = features: dependency:
|
|
assert (builtins.isList features);
|
|
assert (builtins.isAttrs dependency);
|
|
let
|
|
defaultOrNil =
|
|
if dependency.usesDefaultFeatures or true
|
|
then [ "default" ]
|
|
else [ ];
|
|
explicitFeatures = dependency.features or [ ];
|
|
additionalDependencyFeatures =
|
|
let
|
|
dependencyPrefix = (dependency.rename or dependency.name) + "/";
|
|
dependencyFeatures =
|
|
builtins.filter (f: lib.hasPrefix dependencyPrefix f) features;
|
|
in
|
|
builtins.map (lib.removePrefix dependencyPrefix) dependencyFeatures;
|
|
in
|
|
defaultOrNil ++ explicitFeatures ++ additionalDependencyFeatures;
|
|
|
|
/* Sorts and removes duplicates from a list of strings. */
|
|
sortedUnique = features:
|
|
assert (builtins.isList features);
|
|
assert (builtins.all builtins.isString features);
|
|
let
|
|
outFeaturesSet = lib.foldl (set: feature: set // { "${feature}" = 1; }) { } features;
|
|
outFeaturesUnique = builtins.attrNames outFeaturesSet;
|
|
in
|
|
builtins.sort (a: b: a < b) outFeaturesUnique;
|
|
|
|
deprecationWarning = message: value:
|
|
if strictDeprecation
|
|
then builtins.throw "strictDeprecation enabled, aborting: ${message}"
|
|
else builtins.trace message value;
|
|
|
|
#
|
|
# crate2nix/default.nix (excerpt end)
|
|
#
|
|
};
|
|
}
|
|
|