Merge remote-tracking branch 'origin/master' into staging-next

This commit is contained in:
Martin Weinelt 2024-06-27 16:15:56 +02:00
commit d50a1e97b1
No known key found for this signature in database
GPG Key ID: 87C1E9888F856759
221 changed files with 9495 additions and 4187 deletions

View File

@ -23,6 +23,7 @@ let
{ name = "fileset"; description = "file set functions"; }
{ name = "sources"; description = "source filtering functions"; }
{ name = "cli"; description = "command-line serialization functions"; }
{ name = "generators"; description = "functions that create file formats from nix data structures"; }
{ name = "gvariant"; description = "GVariant formatted string serialization functions"; }
{ name = "customisation"; description = "Functions to customise (derivation-related) functions, derivatons, or attribute sets"; }
{ name = "meta"; description = "functions for derivation metadata"; }

View File

@ -54,4 +54,4 @@ merge:"diff3"
Nix store paths can be converted to strings by enclosing a derivation attribute like so: `"${drv}"`.
:::
Detailed documentation for each generator can be found in `lib/generators.nix`.
Detailed documentation for each generator can be found [here](#sec-functions-library-generators)

View File

@ -17,7 +17,7 @@ let
else "";
in
{
/*
/**
Restrict a derivation to a predictable set of attribute names, so
that the returned attrset is not strict in the actual derivation,
saving a lot of computation when the derivation is non-trivial.
@ -62,25 +62,36 @@ in
(lazyDerivation { inherit derivation }).pythonPath
# Inputs
Takes an attribute set with the following attributes
`derivation`
: The derivation to be wrapped.
`meta`
: Optional meta attribute.
While this function is primarily about derivations, it can improve
the `meta` package attribute, which is usually specified through
`mkDerivation`.
`passthru`
: Optional extra values to add to the returned attrset.
This can be used for adding package attributes, such as `tests`.
`outputs`
: Optional list of assumed outputs. Default: ["out"]
This must match the set of outputs that the returned derivation has.
You must use this when the derivation has multiple outputs.
*/
lazyDerivation =
args@{
# The derivation to be wrapped.
derivation
, # Optional meta attribute.
#
# While this function is primarily about derivations, it can improve
# the `meta` package attribute, which is usually specified through
# `mkDerivation`.
meta ? null
, # Optional extra values to add to the returned attrset.
#
# This can be used for adding package attributes, such as `tests`.
passthru ? { }
, # Optional list of assumed outputs. Default: ["out"]
#
# This must match the set of outputs that the returned derivation has.
# You must use this when the derivation has multiple outputs.
derivation,
meta ? null,
passthru ? { },
outputs ? [ "out" ]
}:
let
@ -149,16 +160,36 @@ in
// genAttrs outputs (outputName: checked.${outputName})
// passthru;
/* Conditionally set a derivation attribute.
/**
Conditionally set a derivation attribute.
Because `mkDerivation` sets `__ignoreNulls = true`, a derivation
attribute set to `null` will not impact the derivation output hash.
Thus, this function passes through its `value` argument if the `cond`
is `true`, but returns `null` if not.
Type: optionalDrvAttr :: Bool -> a -> a | Null
Example:
# Inputs
`cond`
: Condition
`value`
: Attribute value
# Type
```
optionalDrvAttr :: Bool -> a -> a | Null
```
# Examples
:::{.example}
## `lib.derivations.optionalDrvAttr` usage example
```nix
(stdenv.mkDerivation {
name = "foo";
x = optionalDrvAttr true 1;
@ -168,10 +199,11 @@ in
x = 1;
}).drvPath
=> true
```
:::
*/
optionalDrvAttr =
# Condition
cond:
# Attribute value
value: if cond then value else null;
}

View File

@ -1,4 +1,4 @@
/*
/**
Functions for querying information about the filesystem
without copying any files to the Nix store.
*/
@ -29,19 +29,35 @@ in
{
/*
/**
The type of a path. The path needs to exist and be accessible.
The result is either "directory" for a directory, "regular" for a regular file, "symlink" for a symlink, or "unknown" for anything else.
Type:
pathType :: Path -> String
# Inputs
Example:
path
: The path to query
# Type
```
pathType :: Path -> String
```
# Examples
:::{.example}
## `lib.filesystem.pathType` usage example
```nix
pathType /.
=> "directory"
pathType /some/file.nix
=> "regular"
```
:::
*/
pathType =
builtins.readFileType or
@ -59,13 +75,27 @@ in
else (readDir (dirOf path)).${baseNameOf path}
);
/*
/**
Whether a path exists and is a directory.
Type:
pathIsDirectory :: Path -> Bool
Example:
# Inputs
`path`
: 1\. Function argument
# Type
```
pathIsDirectory :: Path -> Bool
```
# Examples
:::{.example}
## `lib.filesystem.pathIsDirectory` usage example
```nix
pathIsDirectory /.
=> true
@ -74,17 +104,34 @@ in
pathIsDirectory /some/file.nix
=> false
```
:::
*/
pathIsDirectory = path:
pathExists path && pathType path == "directory";
/*
/**
Whether a path exists and is a regular file, meaning not a symlink or any other special file type.
Type:
pathIsRegularFile :: Path -> Bool
Example:
# Inputs
`path`
: 1\. Function argument
# Type
```
pathIsRegularFile :: Path -> Bool
```
# Examples
:::{.example}
## `lib.filesystem.pathIsRegularFile` usage example
```nix
pathIsRegularFile /.
=> false
@ -93,19 +140,32 @@ in
pathIsRegularFile /some/file.nix
=> true
```
:::
*/
pathIsRegularFile = path:
pathExists path && pathType path == "regular";
/*
/**
A map of all haskell packages defined in the given path,
identified by having a cabal file with the same name as the
directory itself.
Type: Path -> Map String Path
# Inputs
`root`
: The directory within to search
# Type
```
Path -> Map String Path
```
*/
haskellPathsInDir =
# The directory within to search
root:
let # Files in the root
root-files = builtins.attrNames (builtins.readDir root);
@ -120,17 +180,30 @@ in
builtins.pathExists (value + "/${name}.cabal")
) root-files-with-paths;
in builtins.listToAttrs cabal-subdirs;
/*
/**
Find the first directory containing a file matching 'pattern'
upward from a given 'file'.
Returns 'null' if no directories contain a file matching 'pattern'.
Type: RegExp -> Path -> Nullable { path : Path; matches : [ MatchResults ]; }
# Inputs
`pattern`
: The pattern to search for
`file`
: The file to start searching upward from
# Type
```
RegExp -> Path -> Nullable { path : Path; matches : [ MatchResults ]; }
```
*/
locateDominatingFile =
# The pattern to search for
pattern:
# The file to start searching upward from
file:
let go = path:
let files = builtins.attrNames (builtins.readDir path);
@ -150,13 +223,23 @@ in
in go (if isDir then file else parent);
/*
/**
Given a directory, return a flattened list of all files within it recursively.
Type: Path -> [ Path ]
# Inputs
`dir`
: The path to recursively list
# Type
```
Path -> [ Path ]
```
*/
listFilesRecursive =
# The path to recursively list
dir:
lib.flatten (lib.mapAttrsToList (name: type:
if type == "directory" then
@ -165,7 +248,7 @@ in
dir + "/${name}"
) (builtins.readDir dir));
/*
/**
Transform a directory tree containing package files suitable for
`callPackage` into a matching nested attribute set of derivations.
@ -223,7 +306,37 @@ in
As a result, directories with no `.nix` files (including empty
directories) will be transformed into empty attribute sets.
Example:
# Inputs
Structured function argument
: Attribute set containing the following attributes.
Additional attributes are ignored.
`callPackage`
: `pkgs.callPackage`
Type: `Path -> AttrSet -> a`
`directory`
: The directory to read package files from
Type: `Path`
# Type
```
packagesFromDirectoryRecursive :: AttrSet -> AttrSet
```
# Examples
:::{.example}
## `lib.filesystem.packagesFromDirectoryRecursive` usage example
```nix
packagesFromDirectoryRecursive {
inherit (pkgs) callPackage;
directory = ./my-packages;
@ -237,26 +350,13 @@ in
}
)
=> { ... }
```
Type:
packagesFromDirectoryRecursive :: AttrSet -> AttrSet
:::
*/
packagesFromDirectoryRecursive =
# Options.
{
/*
`pkgs.callPackage`
Type:
Path -> AttrSet -> a
*/
callPackage,
/*
The directory to read package files from
Type:
Path
*/
directory,
...
}:

View File

@ -1,17 +1,22 @@
/* Functions that generate widespread file
* formats from nix data structures.
*
* They all follow a similar interface:
* generator { config-attrs } data
*
* `config-attrs` are holes in the generators
* with sensible default implementations that
* can be overwritten. The default implementations
* are mostly generators themselves, called with
* their respective default values; they can be reused.
*
* Tests can be found in ./tests/misc.nix
* Documentation in the manual, #sec-generators
/**
Functions that generate widespread file
formats from nix data structures.
They all follow a similar interface:
```nix
generator { config-attrs } data
```
`config-attrs` are holes in the generators
with sensible default implementations that
can be overwritten. The default implementations
are mostly generators themselves, called with
their respective default values; they can be reused.
Tests can be found in ./tests/misc.nix
Further Documentation can be found [here](#sec-generators).
*/
{ lib }:
@ -68,10 +73,19 @@ let
;
## -- HELPER FUNCTIONS & DEFAULTS --
in rec {
/**
Convert a value to a sensible default string representation.
The builtin `toString` function has some strange defaults,
suitable for bash scripts but not much else.
/* Convert a value to a sensible default string representation.
* The builtin `toString` function has some strange defaults,
* suitable for bash scripts but not much else.
# Inputs
Options
: Empty set, there may be configuration options in the future
`v`
: 2\. Function argument
*/
mkValueStringDefault = {}: v:
let err = t: v: abort
@ -100,14 +114,35 @@ let
else err "this value is" (toString v);
/* Generate a line of key k and value v, separated by
* character sep. If sep appears in k, it is escaped.
* Helper for synaxes with different separators.
*
* mkValueString specifies how values should be formatted.
*
* mkKeyValueDefault {} ":" "f:oo" "bar"
* > "f\:oo:bar"
/**
Generate a line of key k and value v, separated by
character sep. If sep appears in k, it is escaped.
Helper for synaxes with different separators.
mkValueString specifies how values should be formatted.
```nix
mkKeyValueDefault {} ":" "f:oo" "bar"
> "f\:oo:bar"
```
# Inputs
Structured function argument
: mkValueString (optional, default: `mkValueStringDefault {}`)
: Function to convert values to strings
`sep`
: 2\. Function argument
`k`
: 3\. Function argument
`v`
: 4\. Function argument
*/
mkKeyValueDefault = {
mkValueString ? mkValueStringDefault {}
@ -118,9 +153,22 @@ let
## -- FILE FORMAT GENERATORS --
/* Generate a key-value-style config file from an attrset.
*
* mkKeyValue is the same as in toINI.
/**
Generate a key-value-style config file from an attrset.
# Inputs
Structured function argument
: mkKeyValue (optional, default: `mkKeyValueDefault {} "="`)
: format a setting line from key and value
: listsAsDuplicateKeys (optional, default: `false`)
: allow lists as values for duplicate keys
: indent (optional, default: `""`)
: Initial indentation level
*/
toKeyValue = {
mkKeyValue ? mkKeyValueDefault {} "=",
@ -134,32 +182,51 @@ let
in attrs: concatStrings (concatLists (mapAttrsToList mkLines attrs));
/* Generate an INI-style config file from an
* attrset of sections to an attrset of key-value pairs.
*
* generators.toINI {} {
* foo = { hi = "${pkgs.hello}"; ciao = "bar"; };
* baz = { "also, integers" = 42; };
* }
*
*> [baz]
*> also, integers=42
*>
*> [foo]
*> ciao=bar
*> hi=/nix/store/y93qql1p5ggfnaqjjqhxcw0vqw95rlz0-hello-2.10
*
* The mk* configuration attributes can generically change
* the way sections and key-value strings are generated.
*
* For more examples see the test cases in ./tests/misc.nix.
/**
Generate an INI-style config file from an
attrset of sections to an attrset of key-value pairs.
# Inputs
Structured function argument
: mkSectionName (optional, default: `(name: escape [ "[" "]" ] name)`)
: apply transformations (e.g. escapes) to section names
: mkKeyValue (optional, default: `{} "="`)
: format a setting line from key and value
: listsAsDuplicateKeys (optional, default: `false`)
: allow lists as values for duplicate keys
# Examples
:::{.example}
## `lib.generators.toINI` usage example
```nix
generators.toINI {} {
foo = { hi = "${pkgs.hello}"; ciao = "bar"; };
baz = { "also, integers" = 42; };
}
> [baz]
> also, integers=42
>
> [foo]
> ciao=bar
> hi=/nix/store/y93qql1p5ggfnaqjjqhxcw0vqw95rlz0-hello-2.10
```
The mk* configuration attributes can generically change
the way sections and key-value strings are generated.
For more examples see the test cases in ./tests/misc.nix.
:::
*/
toINI = {
# apply transformations (e.g. escapes) to section names
mkSectionName ? (name: escape [ "[" "]" ] name),
# format a setting line from key and value
mkKeyValue ? mkKeyValueDefault {} "=",
# allow lists as values for duplicate keys
listsAsDuplicateKeys ? false
}: attrsOfAttrs:
let
@ -174,43 +241,70 @@ let
# map input to ini sections
mapAttrsToStringsSep "\n" mkSection attrsOfAttrs;
/* Generate an INI-style config file from an attrset
* specifying the global section (no header), and an
* attrset of sections to an attrset of key-value pairs.
*
* generators.toINIWithGlobalSection {} {
* globalSection = {
* someGlobalKey = "hi";
* };
* sections = {
* foo = { hi = "${pkgs.hello}"; ciao = "bar"; };
* baz = { "also, integers" = 42; };
* }
*
*> someGlobalKey=hi
*>
*> [baz]
*> also, integers=42
*>
*> [foo]
*> ciao=bar
*> hi=/nix/store/y93qql1p5ggfnaqjjqhxcw0vqw95rlz0-hello-2.10
*
* The mk* configuration attributes can generically change
* the way sections and key-value strings are generated.
*
* For more examples see the test cases in ./tests/misc.nix.
*
* If you dont need a global section, you can also use
* `generators.toINI` directly, which only takes
* the part in `sections`.
/**
Generate an INI-style config file from an attrset
specifying the global section (no header), and an
attrset of sections to an attrset of key-value pairs.
# Inputs
1\. Structured function argument
: mkSectionName (optional, default: `(name: escape [ "[" "]" ] name)`)
: apply transformations (e.g. escapes) to section names
: mkKeyValue (optional, default: `{} "="`)
: format a setting line from key and value
: listsAsDuplicateKeys (optional, default: `false`)
: allow lists as values for duplicate keys
2\. Structured function argument
: globalSection (required)
: global section key-value pairs
: sections (optional, default: `{}`)
: attrset of sections to key-value pairs
# Examples
:::{.example}
## `lib.generators.toINIWithGlobalSection` usage example
```nix
generators.toINIWithGlobalSection {} {
globalSection = {
someGlobalKey = "hi";
};
sections = {
foo = { hi = "${pkgs.hello}"; ciao = "bar"; };
baz = { "also, integers" = 42; };
}
> someGlobalKey=hi
>
> [baz]
> also, integers=42
>
> [foo]
> ciao=bar
> hi=/nix/store/y93qql1p5ggfnaqjjqhxcw0vqw95rlz0-hello-2.10
```
The mk* configuration attributes can generically change
the way sections and key-value strings are generated.
For more examples see the test cases in ./tests/misc.nix.
:::
If you dont need a global section, you can also use
`generators.toINI` directly, which only takes
the part in `sections`.
*/
toINIWithGlobalSection = {
# apply transformations (e.g. escapes) to section names
mkSectionName ? (name: escape [ "[" "]" ] name),
# format a setting line from key and value
mkKeyValue ? mkKeyValueDefault {} "=",
# allow lists as values for duplicate keys
listsAsDuplicateKeys ? false
}: { globalSection, sections ? {} }:
( if globalSection == {}
@ -219,23 +313,42 @@ let
+ "\n")
+ (toINI { inherit mkSectionName mkKeyValue listsAsDuplicateKeys; } sections);
/* Generate a git-config file from an attrset.
*
* It has two major differences from the regular INI format:
*
* 1. values are indented with tabs
* 2. sections can have sub-sections
*
* generators.toGitINI {
* url."ssh://git@github.com/".insteadOf = "https://github.com";
* user.name = "edolstra";
* }
*
*> [url "ssh://git@github.com/"]
*> insteadOf = "https://github.com"
*>
*> [user]
*> name = "edolstra"
/**
Generate a git-config file from an attrset.
It has two major differences from the regular INI format:
1. values are indented with tabs
2. sections can have sub-sections
Further: https://git-scm.com/docs/git-config#EXAMPLES
# Examples
:::{.example}
## `lib.generators.toGitINI` usage example
```nix
generators.toGitINI {
url."ssh://git@github.com/".insteadOf = "https://github.com";
user.name = "edolstra";
}
> [url "ssh://git@github.com/"]
> insteadOf = "https://github.com"
>
> [user]
> name = "edolstra"
```
:::
# Inputs
`attrs`
: Key-value pairs to be converted to a git-config file.
See: https://git-scm.com/docs/git-config#_variables for possible values.
*/
toGitINI = attrs:
let
@ -280,20 +393,40 @@ let
in
toINI_ (gitFlattenAttrs attrs);
# mkKeyValueDefault wrapper that handles dconf INI quirks.
# The main differences of the format is that it requires strings to be quoted.
/**
mkKeyValueDefault wrapper that handles dconf INI quirks.
The main differences of the format is that it requires strings to be quoted.
*/
mkDconfKeyValue = mkKeyValueDefault { mkValueString = v: toString (gvariant.mkValue v); } "=";
# Generates INI in dconf keyfile style. See https://help.gnome.org/admin/system-admin-guide/stable/dconf-keyfiles.html.en
# for details.
/**
Generates INI in dconf keyfile style. See https://help.gnome.org/admin/system-admin-guide/stable/dconf-keyfiles.html.en
for details.
*/
toDconfINI = toINI { mkKeyValue = mkDconfKeyValue; };
/**
Recurses through a `Value` limited to a certain depth. (`depthLimit`)
If the depth is exceeded, an error is thrown, unless `throwOnDepthLimit` is set to `false`.
# Inputs
Structured function argument
: depthLimit (required)
: If this option is not null, the given value will stop evaluating at a certain depth
: throwOnDepthLimit (optional, default: `true`)
: If this option is true, an error will be thrown, if a certain given depth is exceeded
Value
: The value to be evaluated recursively
*/
withRecursion =
{
/* If this option is not null, the given value will stop evaluating at a certain depth */
depthLimit
/* If this option is true, an error will be thrown, if a certain given depth is exceeded */
, throwOnDepthLimit ? true
depthLimit,
throwOnDepthLimit ? true
}:
assert isInt depthLimit;
let
@ -323,20 +456,33 @@ let
in
mapAny 0;
/* Pretty print a value, akin to `builtins.trace`.
* Should probably be a builtin as well.
* The pretty-printed string should be suitable for rendering default values
* in the NixOS manual. In particular, it should be as close to a valid Nix expression
* as possible.
/**
Pretty print a value, akin to `builtins.trace`.
Should probably be a builtin as well.
The pretty-printed string should be suitable for rendering default values
in the NixOS manual. In particular, it should be as close to a valid Nix expression
as possible.
# Inputs
Structured function argument
: allowPrettyValues
: If this option is true, attrsets like { __pretty = fn; val = ; }
will use fn to convert val to a pretty printed representation.
(This means fn is type Val -> String.)
: multiline
: If this option is true, the output is indented with newlines for attribute sets and lists
: indent
: Initial indentation level
Value
: The value to be pretty printed
*/
toPretty = {
/* If this option is true, attrsets like { __pretty = fn; val = ; }
will use fn to convert val to a pretty printed representation.
(This means fn is type Val -> String.) */
allowPrettyValues ? false,
/* If this option is true, the output is indented with newlines for attribute sets and lists */
multiline ? true,
/* Initial indentation level */
indent ? ""
}:
let
@ -397,7 +543,17 @@ let
else abort "generators.toPretty: should never happen (v = ${v})";
in go indent;
# PLIST handling
/**
Translate a simple Nix expression to [Plist notation](https://en.wikipedia.org/wiki/Property_list).
# Inputs
Options
: Empty set, there may be configuration options in the future
Value
: The value to be converted to Plist
*/
toPlist = {}: v: let
expr = ind: x:
if x == null then "" else
@ -447,9 +603,21 @@ let
${expr "" v}
</plist>'';
/* Translate a simple Nix expression to Dhall notation.
* Note that integers are translated to Integer and never
* the Natural type.
/**
Translate a simple Nix expression to Dhall notation.
Note that integers are translated to Integer and never
the Natural type.
# Inputs
Options
: Empty set, there may be configuration options in the future
Value
: The value to be converted to Dhall
*/
toDhall = { }@args: v:
let concatItems = concatStringsSep ", ";
@ -471,19 +639,47 @@ ${expr "" v}
else
toJSON v;
/*
/**
Translate a simple Nix expression to Lua representation with occasional
Lua-inlines that can be constructed by mkLuaInline function.
Configuration:
* multiline - by default is true which results in indented block-like view.
* indent - initial indent.
* asBindings - by default generate single value, but with this use attrset to set global vars.
Attention:
Regardless of multiline parameter there is no trailing newline.
Example:
# Inputs
Structured function argument
: multiline (optional, default: `true`)
: If this option is true, the output is indented with newlines for attribute sets and lists
: indent (optional, default: `""`)
: Initial indentation level
: asBindings (optional, default: `false`)
: Interpret as variable bindings
Value
: The value to be converted to Lua
# Type
```
toLua :: AttrSet -> Any -> String
```
# Examples
:::{.example}
## `lib.generators.toLua` usage example
```nix
generators.toLua {}
{
cmd = [ "typescript-language-server" "--stdio" ];
@ -501,16 +697,13 @@ ${expr "" v}
}
}
}
```
Type:
toLua :: AttrSet -> Any -> String
:::
*/
toLua = {
/* If this option is true, the output is indented with newlines for attribute sets and lists */
multiline ? true,
/* Initial indentation level */
indent ? "",
/* Interpret as variable bindings */
asBindings ? false,
}@args: v:
let
@ -559,44 +752,55 @@ ${expr "" v}
else
abort "generators.toLua: type ${typeOf v} is unsupported";
/*
/**
Mark string as Lua expression to be inlined when processed by toLua.
Type:
# Inputs
`expr`
: 1\. Function argument
# Type
```
mkLuaInline :: String -> AttrSet
```
*/
mkLuaInline = expr: { _type = "lua-inline"; inherit expr; };
} // {
/**
Generates JSON from an arbitrary (non-function) value.
For more information see the documentation of the builtin.
in
# Inputs
# Everything in this attrset is the public interface of the file.
{
inherit
mkDconfKeyValue
mkKeyValueDefault
mkLuaInline
mkValueStringDefault
toDconfINI
toDhall
toGitINI
toINI
toINIWithGlobalSection
toKeyValue
toLua
toPlist
toPretty
withRecursion
;
Options
/* Generates JSON from an arbitrary (non-function) value.
* For more information see the documentation of the builtin.
: Empty set, there may be configuration options in the future
Value
: The value to be converted to JSON
*/
toJSON = {}: toJSON;
toJSON = {}: lib.strings.toJSON;
/* YAML has been a strict superset of JSON since 1.2, so we
* use toJSON. Before it only had a few differences referring
* to implicit typing rules, so it should work with older
* parsers as well.
/**
YAML has been a strict superset of JSON since 1.2, so we
use toJSON. Before it only had a few differences referring
to implicit typing rules, so it should work with older
parsers as well.
# Inputs
Options
: Empty set, there may be configuration options in the future
Value
: The value to be converted to YAML
*/
toYAML = {}: toJSON;
toYAML = {}: lib.strings.toJSON;
}

View File

@ -1,4 +1,4 @@
/*
/**
A partial and basic implementation of GVariant formatted strings.
See [GVariant Format Strings](https://docs.gtk.org/glib/gvariant-format-strings.html) for details.
@ -41,17 +41,28 @@ let
variant = "v";
};
/* Check if a value is a GVariant value
Type:
isGVariant :: Any -> Bool
*/
isGVariant = v: v._type or "" == "gvariant";
in
rec {
inherit type isGVariant;
inherit type;
/**
Check if a value is a GVariant value
# Inputs
`v`
: value to check
# Type
```
isGVariant :: Any -> Bool
```
*/
isGVariant = v: v._type or "" == "gvariant";
intConstructors = [
{
@ -100,11 +111,22 @@ rec {
}
];
/* Returns the GVariant value that most closely matches the given Nix value.
/**
Returns the GVariant value that most closely matches the given Nix value.
If no GVariant value can be found unambiguously then error is thrown.
Type:
# Inputs
`v`
: 1\. Function argument
# Type
```
mkValue :: Any -> gvariant
```
*/
mkValue = v:
if builtins.isBool v then
@ -132,14 +154,32 @@ rec {
else
throw "The GVariant type of ${builtins.typeOf v} can't be inferred.";
/* Returns the GVariant array from the given type of the elements and a Nix list.
/**
Returns the GVariant array from the given type of the elements and a Nix list.
Type:
# Inputs
`elems`
: 1\. Function argument
# Type
```
mkArray :: [Any] -> gvariant
```
Example:
# Examples
:::{.example}
## `lib.gvariant.mkArray` usage example
```nix
# Creating a string array
lib.gvariant.mkArray [ "a" "b" "c" ]
```
:::
*/
mkArray = elems:
let
@ -153,31 +193,67 @@ rec {
"@${self.type} [${concatMapStringsSep "," toString self.value}]";
};
/* Returns the GVariant array from the given empty Nix list.
/**
Returns the GVariant array from the given empty Nix list.
Type:
# Inputs
`elemType`
: 1\. Function argument
# Type
```
mkEmptyArray :: gvariant.type -> gvariant
```
Example:
# Examples
:::{.example}
## `lib.gvariant.mkEmptyArray` usage example
```nix
# Creating an empty string array
lib.gvariant.mkEmptyArray (lib.gvariant.type.string)
```
:::
*/
mkEmptyArray = elemType: mkPrimitive (type.arrayOf elemType) [ ] // {
__toString = self: "@${self.type} []";
};
/* Returns the GVariant variant from the given Nix value. Variants are containers
/**
Returns the GVariant variant from the given Nix value. Variants are containers
of different GVariant type.
Type:
mkVariant :: Any -> gvariant
Example:
# Inputs
`elem`
: 1\. Function argument
# Type
```
mkVariant :: Any -> gvariant
```
# Examples
:::{.example}
## `lib.gvariant.mkVariant` usage example
```nix
lib.gvariant.mkArray [
(lib.gvariant.mkVariant "a string")
(lib.gvariant.mkVariant (lib.gvariant.mkInt32 1))
]
```
:::
*/
mkVariant = elem:
let gvarElem = mkValue elem;
@ -185,23 +261,43 @@ rec {
__toString = self: "<${toString self.value}>";
};
/* Returns the GVariant dictionary entry from the given key and value.
/**
Returns the GVariant dictionary entry from the given key and value.
Type:
# Inputs
`name`
: The key of the entry
`value`
: The value of the entry
# Type
```
mkDictionaryEntry :: String -> Any -> gvariant
```
Example:
# Examples
:::{.example}
## `lib.gvariant.mkDictionaryEntry` usage example
```nix
# A dictionary describing an Epiphanys search provider
[
(lib.gvariant.mkDictionaryEntry "url" (lib.gvariant.mkVariant "https://duckduckgo.com/?q=%s&t=epiphany"))
(lib.gvariant.mkDictionaryEntry "bang" (lib.gvariant.mkVariant "!d"))
(lib.gvariant.mkDictionaryEntry "name" (lib.gvariant.mkVariant "DuckDuckGo"))
]
```
:::
*/
mkDictionaryEntry =
# The key of the entry
name:
# The value of the entry
value:
let
name' = mkValue name;
@ -212,10 +308,25 @@ rec {
__toString = self: "@${self.type} {${name'},${value'}}";
};
/* Returns the GVariant maybe from the given element type.
/**
Returns the GVariant maybe from the given element type.
Type:
# Inputs
`elemType`
: 1\. Function argument
`elem`
: 2\. Function argument
# Type
```
mkMaybe :: gvariant.type -> Any -> gvariant
```
*/
mkMaybe = elemType: elem:
mkPrimitive (type.maybeOf elemType) elem // {
@ -226,24 +337,57 @@ rec {
"just ${toString self.value}";
};
/* Returns the GVariant nothing from the given element type.
/**
Returns the GVariant nothing from the given element type.
Type:
# Inputs
`elemType`
: 1\. Function argument
# Type
```
mkNothing :: gvariant.type -> gvariant
```
*/
mkNothing = elemType: mkMaybe elemType null;
/* Returns the GVariant just from the given Nix value.
/**
Returns the GVariant just from the given Nix value.
Type:
# Inputs
`elem`
: 1\. Function argument
# Type
```
mkJust :: Any -> gvariant
```
*/
mkJust = elem: let gvarElem = mkValue elem; in mkMaybe gvarElem.type gvarElem;
/* Returns the GVariant tuple from the given Nix list.
/**
Returns the GVariant tuple from the given Nix list.
Type:
# Inputs
`elems`
: 1\. Function argument
# Type
```
mkTuple :: [Any] -> gvariant
```
*/
mkTuple = elems:
let
@ -255,20 +399,42 @@ rec {
"@${self.type} (${concatMapStringsSep "," toString self.value})";
};
/* Returns the GVariant boolean from the given Nix bool value.
/**
Returns the GVariant boolean from the given Nix bool value.
Type:
# Inputs
`v`
: 1\. Function argument
# Type
```
mkBoolean :: Bool -> gvariant
```
*/
mkBoolean = v:
mkPrimitive type.boolean v // {
__toString = self: if self.value then "true" else "false";
};
/* Returns the GVariant string from the given Nix string value.
/**
Returns the GVariant string from the given Nix string value.
Type:
# Inputs
`v`
: 1\. Function argument
# Type
```
mkString :: String -> gvariant
```
*/
mkString = v:
let sanitize = s: replaceStrings [ "\n" ] [ "\\n" ] (escape [ "'" "\\" ] s);
@ -276,72 +442,129 @@ rec {
__toString = self: "'${sanitize self.value}'";
};
/* Returns the GVariant object path from the given Nix string value.
/**
Returns the GVariant object path from the given Nix string value.
Type:
# Inputs
`v`
: 1\. Function argument
# Type
```
mkObjectpath :: String -> gvariant
```
*/
mkObjectpath = v:
mkPrimitive type.string v // {
__toString = self: "objectpath '${escape [ "'" ] self.value}'";
};
/* Returns the GVariant uchar from the given Nix int value.
/**
Returns the GVariant uchar from the given Nix int value.
Type:
# Type
```
mkUchar :: Int -> gvariant
```
*/
mkUchar = mkPrimitive type.uchar;
/* Returns the GVariant int16 from the given Nix int value.
/**
Returns the GVariant int16 from the given Nix int value.
Type:
# Type
```
mkInt16 :: Int -> gvariant
```
*/
mkInt16 = mkPrimitive type.int16;
/* Returns the GVariant uint16 from the given Nix int value.
/**
Returns the GVariant uint16 from the given Nix int value.
Type:
# Type
```
mkUint16 :: Int -> gvariant
```
*/
mkUint16 = mkPrimitive type.uint16;
/* Returns the GVariant int32 from the given Nix int value.
/**
Returns the GVariant int32 from the given Nix int value.
Type:
# Inputs
`v`
: 1\. Function argument
# Type
```
mkInt32 :: Int -> gvariant
```
*/
mkInt32 = v:
mkPrimitive type.int32 v // {
__toString = self: toString self.value;
};
/* Returns the GVariant uint32 from the given Nix int value.
/**
Returns the GVariant uint32 from the given Nix int value.
Type:
# Type
```
mkUint32 :: Int -> gvariant
```
*/
mkUint32 = mkPrimitive type.uint32;
/* Returns the GVariant int64 from the given Nix int value.
/**
Returns the GVariant int64 from the given Nix int value.
Type:
# Type
```
mkInt64 :: Int -> gvariant
```
*/
mkInt64 = mkPrimitive type.int64;
/* Returns the GVariant uint64 from the given Nix int value.
/**
Returns the GVariant uint64 from the given Nix int value.
Type:
# Type
```
mkUint64 :: Int -> gvariant
```
*/
mkUint64 = mkPrimitive type.uint64;
/* Returns the GVariant double from the given Nix float value.
/**
Returns the GVariant double from the given Nix float value.
Type:
# Inputs
`v`
: 1\. Function argument
# Type
```
mkDouble :: Float -> gvariant
```
*/
mkDouble = v:
mkPrimitive type.double v // {

View File

@ -1,5 +1,7 @@
/* Some functions for manipulating meta attributes, as well as the
name attribute. */
/**
Some functions for manipulating meta attributes, as well as the
name attribute.
*/
{ lib }:
@ -11,74 +13,190 @@ in
rec {
/* Add to or override the meta attributes of the given
/**
Add to or override the meta attributes of the given
derivation.
Example:
# Inputs
`newAttrs`
: 1\. Function argument
`drv`
: 2\. Function argument
# Examples
:::{.example}
## `lib.meta.addMetaAttrs` usage example
```nix
addMetaAttrs {description = "Bla blah";} somePkg
```
:::
*/
addMetaAttrs = newAttrs: drv:
drv // { meta = (drv.meta or {}) // newAttrs; };
/* Disable Hydra builds of given derivation.
/**
Disable Hydra builds of given derivation.
# Inputs
`drv`
: 1\. Function argument
*/
dontDistribute = drv: addMetaAttrs { hydraPlatforms = []; } drv;
/*
/**
Change the [symbolic name of a derivation](https://nixos.org/manual/nix/stable/language/derivations.html#attr-name).
:::{.warning}
Dependent derivations will be rebuilt when the symbolic name is changed.
:::
# Inputs
`name`
: 1\. Function argument
`drv`
: 2\. Function argument
*/
setName = name: drv: drv // {inherit name;};
/* Like `setName`, but takes the previous name as an argument.
/**
Like `setName`, but takes the previous name as an argument.
Example:
# Inputs
`updater`
: 1\. Function argument
`drv`
: 2\. Function argument
# Examples
:::{.example}
## `lib.meta.updateName` usage example
```nix
updateName (oldName: oldName + "-experimental") somePkg
```
:::
*/
updateName = updater: drv: drv // {name = updater (drv.name);};
/* Append a suffix to the name of a package (before the version
part). */
/**
Append a suffix to the name of a package (before the version
part).
# Inputs
`suffix`
: 1\. Function argument
*/
appendToName = suffix: updateName (name:
let x = builtins.parseDrvName name; in "${x.name}-${suffix}-${x.version}");
/* Apply a function to each derivation and only to derivations in an attrset.
/**
Apply a function to each derivation and only to derivations in an attrset.
# Inputs
`f`
: 1\. Function argument
`set`
: 2\. Function argument
*/
mapDerivationAttrset = f: set: lib.mapAttrs (name: pkg: if lib.isDerivation pkg then (f pkg) else pkg) set;
/* Set the nix-env priority of the package.
/**
Set the nix-env priority of the package.
# Inputs
`priority`
: 1\. Function argument
`drv`
: 2\. Function argument
*/
setPrio = priority: addMetaAttrs { inherit priority; };
/* Decrease the nix-env priority of the package, i.e., other
/**
Decrease the nix-env priority of the package, i.e., other
versions/variants of the package will be preferred.
# Inputs
`drv`
: 1\. Function argument
*/
lowPrio = setPrio 10;
/* Apply lowPrio to an attrset with derivations
/**
Apply lowPrio to an attrset with derivations
# Inputs
`set`
: 1\. Function argument
*/
lowPrioSet = set: mapDerivationAttrset lowPrio set;
/* Increase the nix-env priority of the package, i.e., this
/**
Increase the nix-env priority of the package, i.e., this
version/variant of the package will be preferred.
# Inputs
`drv`
: 1\. Function argument
*/
hiPrio = setPrio (-10);
/* Apply hiPrio to an attrset with derivations
/**
Apply hiPrio to an attrset with derivations
# Inputs
`set`
: 1\. Function argument
*/
hiPrioSet = set: mapDerivationAttrset hiPrio set;
/* Check to see if a platform is matched by the given `meta.platforms`
/**
Check to see if a platform is matched by the given `meta.platforms`
element.
A `meta.platform` pattern is either
@ -92,9 +210,28 @@ rec {
We can inject these into a pattern for the whole of a structured platform,
and then match that.
Example:
# Inputs
`platform`
: 1\. Function argument
`elem`
: 2\. Function argument
# Examples
:::{.example}
## `lib.meta.platformMatch` usage example
```nix
lib.meta.platformMatch { system = "aarch64-darwin"; } "aarch64-darwin"
=> true
```
:::
*/
platformMatch = platform: elem: (
# Check with simple string comparison if elem was a string.
@ -112,7 +249,8 @@ rec {
) platform
);
/* Check if a package is available on a given platform.
/**
Check if a package is available on a given platform.
A package is available on a platform if both
@ -121,23 +259,50 @@ rec {
2. None of `meta.badPlatforms` pattern matches the given platform.
Example:
# Inputs
`platform`
: 1\. Function argument
`pkg`
: 2\. Function argument
# Examples
:::{.example}
## `lib.meta.availableOn` usage example
```nix
lib.meta.availableOn { system = "aarch64-darwin"; } pkg.zsh
=> true
```
:::
*/
availableOn = platform: pkg:
((!pkg?meta.platforms) || any (platformMatch platform) pkg.meta.platforms) &&
all (elem: !platformMatch platform elem) (pkg.meta.badPlatforms or []);
/* Get the corresponding attribute in lib.licenses
/**
Get the corresponding attribute in lib.licenses
from the SPDX ID.
For SPDX IDs, see
https://spdx.org/licenses
Type:
getLicenseFromSpdxId :: str -> AttrSet
# Type
Example:
```
getLicenseFromSpdxId :: str -> AttrSet
```
# Examples
:::{.example}
## `lib.meta.getLicenseFromSpdxId` usage example
```nix
lib.getLicenseFromSpdxId "MIT" == lib.licenses.mit
=> true
lib.getLicenseFromSpdxId "mIt" == lib.licenses.mit
@ -145,6 +310,9 @@ rec {
lib.getLicenseFromSpdxId "MY LICENSE"
=> trace: warning: getLicenseFromSpdxId: No license matches the given SPDX ID: MY LICENSE
=> { shortName = "MY LICENSE"; }
```
:::
*/
getLicenseFromSpdxId =
let
@ -156,15 +324,34 @@ rec {
{ shortName = licstr; }
);
/* Get the path to the main program of a package based on meta.mainProgram
/**
Get the path to the main program of a package based on meta.mainProgram
Type: getExe :: package -> string
Example:
# Inputs
`x`
: 1\. Function argument
# Type
```
getExe :: package -> string
```
# Examples
:::{.example}
## `lib.meta.getExe` usage example
```nix
getExe pkgs.hello
=> "/nix/store/g124820p9hlv4lj8qplzxw1c44dxaw1k-hello-2.12/bin/hello"
getExe pkgs.mustache-go
=> "/nix/store/am9ml4f4ywvivxnkiaqwr0hyxka1xjsf-mustache-go-1.3.0/bin/mustache"
```
:::
*/
getExe = x: getExe' x (x.meta.mainProgram or (
# This could be turned into an error when 23.05 is at end of life
@ -173,14 +360,38 @@ rec {
x
));
/* Get the path of a program of a derivation.
/**
Get the path of a program of a derivation.
Type: getExe' :: derivation -> string -> string
Example:
# Inputs
`x`
: 1\. Function argument
`y`
: 2\. Function argument
# Type
```
getExe' :: derivation -> string -> string
```
# Examples
:::{.example}
## `lib.meta.getExe'` usage example
```nix
getExe' pkgs.hello "hello"
=> "/nix/store/g124820p9hlv4lj8qplzxw1c44dxaw1k-hello-2.12/bin/hello"
getExe' pkgs.imagemagick "convert"
=> "/nix/store/5rs48jamq7k6sal98ymj9l4k2bnwq515-imagemagick-7.1.1-15/bin/convert"
```
:::
*/
getExe' = x: y:
assert assertMsg (isDerivation x)

View File

@ -5883,6 +5883,13 @@
githubId = 13485450;
name = "Emmanuel Rosa";
};
emneo = {
name = "emneo";
email = "emneo@kreog.com";
github = "emneo-dev";
githubId = 44233177;
keys = [ { fingerprint = "5FD0 400D 0E78 EAF9 8431 4880 8EBF C4B9 24C6 2D20"; } ];
};
emptyflask = {
email = "jon@emptyflask.dev";
github = "emptyflask";
@ -11097,12 +11104,6 @@
githubId = 621759;
name = "Lassulus";
};
laurailway = {
email = "laurailway.git@posteo.net";
github = "LAURAilway";
githubId = 118690640;
name = "Laura";
};
laurent-f1z1 = {
email = "laurent.nixpkgs@fainsin.bzh";
github = "Laurent2916";
@ -14202,7 +14203,7 @@
networkexception = {
name = "networkException";
email = "nix@nwex.de";
matrix = "@networkexception:chat.upi.li";
matrix = "@networkexception:nwex.de";
github = "networkException";
githubId = 42888162;
keys = [ { fingerprint = "A0B9 48C5 A263 55C2 035F 8567 FBB7 2A94 52D9 1A72"; } ];
@ -20332,6 +20333,12 @@
email = "tomaszierl@outlook.com";
name = "Tomkoid";
};
Tommimon = {
name = "Tommaso Montanari";
email = "sefymw7q8@mozmail.com";
github = "Tommimon";
githubId = 37435103;
};
tomodachi94 = {
email = "tomodachi94@protonmail.com";
matrix = "@tomodachi94:matrix.org";

View File

@ -58,6 +58,8 @@
nvimpager settings: user commands in `-c` and `--cmd` now override the
respective default settings because they are executed later.
- `pkgs.nextcloud27` has been removed since it's EOL.
- `services.forgejo.mailerPasswordFile` has been deprecated by the drop-in replacement `services.forgejo.secrets.mailer.PASSWD`,
which is part of the new free-form `services.forgejo.secrets` option.
`services.forgejo.secrets` is a small wrapper over systemd's `LoadCredential=`. It has the same structure (sections/keys) as

View File

@ -1,7 +1,7 @@
{
x86_64-linux = "/nix/store/yrsmzlw2lgbknzwic1gy1gmv3l2w1ax8-nix-2.18.3";
i686-linux = "/nix/store/ds9381l9mlwfaclvqnkzn3jl4qb8m3y1-nix-2.18.3";
aarch64-linux = "/nix/store/hw1zny3f8520zyskmp1qaybv1ir5ilxh-nix-2.18.3";
x86_64-darwin = "/nix/store/z08yc4sl1fr65q53wz6pw30h67qafaln-nix-2.18.3";
aarch64-darwin = "/nix/store/p57m7m0wrz8sqxiwinzpwzqzak82zn75-nix-2.18.3";
x86_64-linux = "/nix/store/1w4b47zhp33md29wjhgg549pc281vv02-nix-2.18.4";
i686-linux = "/nix/store/hz02kn0ffn3wdi2xs7lndpr88v4v4fp2-nix-2.18.4";
aarch64-linux = "/nix/store/90zwqa9z2fgldc7ki1p5gfvglchjh9r6-nix-2.18.4";
x86_64-darwin = "/nix/store/bd1ix5mj9lj2yh7bqnmdjc24zlg5jivk-nix-2.18.4";
aarch64-darwin = "/nix/store/5hvsmklhqiay5i4q5vdkg60p8qpc69rz-nix-2.18.4";
}

View File

@ -243,6 +243,7 @@
./programs/nh.nix
./programs/nix-index.nix
./programs/nix-ld.nix
./programs/nix-required-mounts.nix
./programs/nm-applet.nix
./programs/nncp.nix
./programs/noisetorch.nix

View File

@ -0,0 +1,118 @@
{
config,
lib,
pkgs,
...
}:
let
cfg = config.programs.nix-required-mounts;
package = pkgs.nix-required-mounts;
Mount =
with lib;
types.submodule {
options.host = mkOption {
type = types.str;
description = "Host path to mount";
};
options.guest = mkOption {
type = types.str;
description = "Location in the sandbox to mount the host path at";
};
};
Pattern =
with lib.types;
types.submodule (
{ config, name, ... }:
{
options.onFeatures = lib.mkOption {
type = listOf types.str;
description = "Which requiredSystemFeatures should trigger relaxation of the sandbox";
default = [ name ];
};
options.paths = lib.mkOption {
type = listOf (oneOf [
path
Mount
]);
description = "A list of glob patterns, indicating which paths to expose to the sandbox";
};
options.unsafeFollowSymlinks = lib.mkEnableOption ''
Instructs the hook to mount the symlink targets as well, when any of
the `paths` contain symlinks. This may not work correctly with glob
patterns.
'';
}
);
driverPaths = [
pkgs.addOpenGLRunpath.driverLink
# mesa:
config.hardware.opengl.package
# nvidia_x11, etc:
] ++ config.hardware.opengl.extraPackages; # nvidia_x11
defaults = {
nvidia-gpu.onFeatures = package.allowedPatterns.nvidia-gpu.onFeatures;
nvidia-gpu.paths = package.allowedPatterns.nvidia-gpu.paths ++ driverPaths;
nvidia-gpu.unsafeFollowSymlinks = false;
};
in
{
meta.maintainers = with lib.maintainers; [ SomeoneSerge ];
options.programs.nix-required-mounts = {
enable = lib.mkEnableOption "Expose extra paths to the sandbox depending on derivations' requiredSystemFeatures";
presets.nvidia-gpu.enable = lib.mkEnableOption ''
Declare the support for derivations that require an Nvidia GPU to be
available, e.g. derivations with `requiredSystemFeatures = [ "cuda" ]`.
This mounts the corresponding userspace drivers and device nodes in the
sandbox, but only for derivations that request these special features.
You may extend or override the exposed paths via the
`programs.nix-required-mounts.allowedPatterns.nvidia-gpu.paths` option.
'';
allowedPatterns =
with lib.types;
lib.mkOption rec {
type = attrsOf Pattern;
description = "The hook config, describing which paths to mount for which system features";
default = { };
defaultText = lib.literalExpression ''
{
opengl.paths = config.hardware.opengl.extraPackages ++ [
config.hardware.opengl.package
pkgs.addOpenGLRunpath.driverLink
"/dev/dri"
];
}
'';
example.require-ipfs.paths = [ "/ipfs" ];
example.require-ipfs.onFeatures = [ "ifps" ];
};
extraWrapperArgs = lib.mkOption {
type = with lib.types; listOf str;
default = [ ];
description = "List of extra arguments (such as `--add-flags -v`) to pass to the hook's wrapper";
};
package = lib.mkOption {
type = lib.types.package;
default = package.override { inherit (cfg) allowedPatterns extraWrapperArgs; };
description = "The final package with the final config applied";
internal = true;
};
};
config = lib.mkIf cfg.enable (
lib.mkMerge [
{ nix.settings.pre-build-hook = lib.getExe cfg.package; }
(lib.mkIf cfg.presets.nvidia-gpu.enable {
nix.settings.system-features = cfg.allowedPatterns.nvidia-gpu.onFeatures;
programs.nix-required-mounts.allowedPatterns = {
inherit (defaults) nvidia-gpu;
};
})
]
);
}

View File

@ -38,12 +38,13 @@ in
xwayland.enable = lib.mkEnableOption "XWayland" // { default = true; };
systemd.setPath.enable = lib.mkEnableOption null // {
default = true;
default = lib.versionOlder cfg.package.version "0.41.2";
defaultText = lib.literalExpression ''lib.versionOlder cfg.package.version "0.41.2"'';
example = false;
description = ''
Set environment path of systemd to include the current system's bin directory.
This is needed in Hyprland setups, where opening links in applications do not work.
Enabled by default.
Enabled by default for Hyprland versions older than 0.41.2.
'';
};
};

View File

@ -1,6 +1,6 @@
{ config, lib, pkgs, ... }:
let
inherit (lib) types;
inherit (lib) types mkBefore;
cfg = config.services.ollama;
ollamaPackage = cfg.package.override {
@ -132,6 +132,14 @@ in
Since `ollama run` is mostly a shell around the ollama server, this is usually sufficient.
'';
};
loadModels = lib.mkOption {
type = types.listOf types.str;
default = [ ];
description = ''
The models to download as soon as the service starts.
Search for models of your choice from: https://ollama.com/library
'';
};
openFirewall = lib.mkOption {
type = types.bool;
default = false;
@ -161,6 +169,14 @@ in
DynamicUser = cfg.sandbox;
ReadWritePaths = cfg.writablePaths;
};
postStart = mkBefore ''
set -x
export OLLAMA_HOST=${lib.escapeShellArg cfg.host}:${builtins.toString cfg.port}
for model in ${lib.escapeShellArgs cfg.loadModels}
do
${lib.escapeShellArg (lib.getExe ollamaPackage)} pull "$model"
done
'';
};
networking.firewall = lib.mkIf cfg.openFirewall { allowedTCPPorts = [ cfg.port ]; };

View File

@ -24,7 +24,7 @@ let
level = "info";
};
};
configFile = toml.generate "scion-control.toml" (defaultConfig // cfg.settings);
configFile = toml.generate "scion-control.toml" (recursiveUpdate defaultConfig cfg.settings);
in
{
options.services.scion.scion-control = {

View File

@ -21,7 +21,7 @@ let
level = "info";
};
};
configFile = toml.generate "scion-daemon.toml" (defaultConfig // cfg.settings);
configFile = toml.generate "scion-daemon.toml" (recursiveUpdate defaultConfig cfg.settings);
in
{
options.services.scion.scion-daemon = {

View File

@ -15,7 +15,7 @@ let
level = "info";
};
};
configFile = toml.generate "scion-dispatcher.toml" (defaultConfig // cfg.settings);
configFile = toml.generate "scion-dispatcher.toml" (recursiveUpdate defaultConfig cfg.settings);
in
{
options.services.scion.scion-dispatcher = {

View File

@ -11,7 +11,7 @@ let
config_dir = "/etc/scion";
};
};
configFile = toml.generate "scion-router.toml" (defaultConfig // cfg.settings);
configFile = toml.generate "scion-router.toml" (recursiveUpdate defaultConfig cfg.settings);
in
{
options.services.scion.scion-router = {

View File

@ -1,4 +1,4 @@
{ config, lib, ... }:
{ config, lib, pkgs, ... }:
with lib;
@ -17,6 +17,9 @@ in
};
};
config = mkIf cfg.enable {
environment.systemPackages = [
pkgs.scion
];
services.scion = {
scion-dispatcher.enable = true;
scion-daemon.enable = true;

View File

@ -160,7 +160,7 @@ in
ProtectProc = "invisible";
ProtectSystem = "strict";
ReadWritePaths = [
"/var/lib/quickwit"
cfg.dataDir
];
RestrictAddressFamilies = [
"AF_NETLINK"

View File

@ -18,6 +18,8 @@ in {
geoclue2 to determine the current location.
'';
};
package = mkPackageOption pkgs "localtime" { };
geoclue2Package = mkPackageOption pkgs "geoclue2-with-demo-agent" { };
};
};
@ -29,14 +31,14 @@ in {
};
# Install the polkit rules.
environment.systemPackages = [ pkgs.localtime ];
environment.systemPackages = [ cfg.package ];
systemd.services.localtimed = {
wantedBy = [ "multi-user.target" ];
partOf = [ "localtimed-geoclue-agent.service" ];
after = [ "localtimed-geoclue-agent.service" ];
serviceConfig = {
ExecStart = "${pkgs.localtime}/bin/localtimed";
ExecStart = "${cfg.package}/bin/localtimed";
Restart = "on-failure";
Type = "exec";
User = "localtimed";
@ -48,7 +50,7 @@ in {
partOf = [ "geoclue.service" ];
after = [ "geoclue.service" ];
serviceConfig = {
ExecStart = "${pkgs.geoclue2-with-demo-agent}/libexec/geoclue-2.0/demos/agent";
ExecStart = "${cfg.geoclue2Package}/libexec/geoclue-2.0/demos/agent";
Restart = "on-failure";
Type = "exec";
User = "localtimed";

View File

@ -300,7 +300,7 @@ in {
package = mkOption {
type = types.package;
description = "Which package to use for the Nextcloud instance.";
relatedPackages = [ "nextcloud26" "nextcloud27" "nextcloud28" ];
relatedPackages = [ "nextcloud28" "nextcloud29" ];
};
phpPackage = mkPackageOption pkgs "php" {
example = "php82";
@ -861,8 +861,6 @@ in {
nextcloud defined in an overlay, please set `services.nextcloud.package` to
`pkgs.nextcloud`.
''
else if versionOlder stateVersion "23.05" then nextcloud25
else if versionOlder stateVersion "23.11" then nextcloud26
else if versionOlder stateVersion "24.05" then nextcloud27
else nextcloud29
);

View File

@ -64,14 +64,6 @@ let
etcHardlinks = filter (f: f.mode != "symlink" && f.mode != "direct-symlink") etc';
build-composefs-dump = pkgs.buildPackages.runCommand "build-composefs-dump.py"
{
buildInputs = [ pkgs.buildPackages.python3 ];
} ''
install ${./build-composefs-dump.py} $out
patchShebangs --host $out
'';
in
{
@ -295,10 +287,12 @@ in
system.build.etcMetadataImage =
let
etcJson = pkgs.writeText "etc-json" (builtins.toJSON etc');
etcDump = pkgs.runCommand "etc-dump" { } "${build-composefs-dump} ${etcJson} > $out";
etcDump = pkgs.runCommand "etc-dump" { } ''
${lib.getExe pkgs.buildPackages.python3} ${./build-composefs-dump.py} ${etcJson} > $out
'';
in
pkgs.runCommand "etc-metadata.erofs" {
nativeBuildInputs = [ pkgs.composefs pkgs.erofs-utils ];
nativeBuildInputs = with pkgs.buildPackages; [ composefs erofs-utils ];
} ''
mkcomposefs --from-file ${etcDump} $out
fsck.erofs $out

View File

@ -651,6 +651,7 @@ in {
nix-config = handleTest ./nix-config.nix {};
nix-ld = handleTest ./nix-ld.nix {};
nix-misc = handleTest ./nix/misc.nix {};
nix-required-mounts = runTest ./nix-required-mounts;
nix-serve = handleTest ./nix-serve.nix {};
nix-serve-ssh = handleTest ./nix-serve-ssh.nix {};
nixops = handleTest ./nixops/default.nix {};

View File

@ -103,13 +103,8 @@ let
}) { inherit system; });
in with pkgs; {
kafka_2_8 = makeKafkaTest "kafka_2_8" { kafkaPackage = apacheKafka_2_8; };
kafka_3_0 = makeKafkaTest "kafka_3_0" { kafkaPackage = apacheKafka_3_0; };
kafka_3_1 = makeKafkaTest "kafka_3_1" { kafkaPackage = apacheKafka_3_1; };
kafka_3_2 = makeKafkaTest "kafka_3_2" { kafkaPackage = apacheKafka_3_2; };
kafka_3_3 = makeKafkaTest "kafka_3_3" { kafkaPackage = apacheKafka_3_3; };
kafka_3_4 = makeKafkaTest "kafka_3_4" { kafkaPackage = apacheKafka_3_4; };
kafka_3_5 = makeKafkaTest "kafka_3_5" { kafkaPackage = apacheKafka_3_5; };
kafka_3_6 = makeKafkaTest "kafka_3_6" { kafkaPackage = apacheKafka_3_6; };
kafka_3_7 = makeKafkaTest "kafka_3_7" { kafkaPackage = apacheKafka_3_7; };
kafka = makeKafkaTest "kafka" { kafkaPackage = apacheKafka; };
kafka_kraft = makeKafkaTest "kafka_kraft" { kafkaPackage = apacheKafka; mode = "kraft"; };
}

View File

@ -109,4 +109,4 @@ let
./with-objectstore.nix
];
in
listToAttrs (concatMap genTests [ 27 28 29 ])
listToAttrs (concatMap genTests [ 28 29 ])

View File

@ -0,0 +1,58 @@
{ pkgs, ... }:
let
inherit (pkgs) lib;
in
{
name = "nix-required-mounts";
meta.maintainers = with lib.maintainers; [ SomeoneSerge ];
nodes.machine =
{ config, pkgs, ... }:
{
virtualisation.writableStore = true;
system.extraDependencies = [ (pkgs.runCommand "deps" { } "mkdir $out").inputDerivation ];
nix.nixPath = [ "nixpkgs=${../../..}" ];
nix.settings.substituters = lib.mkForce [ ];
nix.settings.system-features = [ "supported-feature" ];
nix.settings.experimental-features = [ "nix-command" ];
programs.nix-required-mounts.enable = true;
programs.nix-required-mounts.allowedPatterns.supported-feature = {
onFeatures = [ "supported-feature" ];
paths = [
"/supported-feature-files"
{
host = "/usr/lib/imaginary-fhs-drivers";
guest = "/run/opengl-driver/lib";
}
];
unsafeFollowSymlinks = true;
};
users.users.person.isNormalUser = true;
systemd.tmpfiles.rules = [
"d /supported-feature-files 0755 person users -"
"f /usr/lib/libcuda.so 0444 root root - fakeContent"
"L /usr/lib/imaginary-fhs-drivers/libcuda.so 0444 root root - /usr/lib/libcuda.so"
];
};
testScript = ''
import shlex
def person_do(cmd, succeed=True):
cmd = shlex.quote(cmd)
cmd = f"su person -l -c {cmd} &>/dev/console"
if succeed:
return machine.succeed(cmd)
else:
return machine.fail(cmd)
start_all()
person_do("nix-build ${./ensure-path-not-present.nix} --argstr feature supported-feature")
person_do("nix-build ${./test-require-feature.nix} --argstr feature supported-feature")
person_do("nix-build ${./test-require-feature.nix} --argstr feature unsupported-feature", succeed=False)
person_do("nix-build ${./test-structured-attrs.nix} --argstr feature supported-feature")
person_do("nix-build ${./test-structured-attrs-empty.nix}")
'';
}

View File

@ -0,0 +1,13 @@
{
pkgs ? import <nixpkgs> { },
feature,
}:
pkgs.runCommandNoCC "${feature}-not-present" { } ''
if [[ -e /${feature}-files ]]; then
echo "No ${feature} in requiredSystemFeatures, but /${feature}-files was mounted anyway"
exit 1
else
touch $out
fi
''

View File

@ -0,0 +1,26 @@
{
pkgs ? import <nixpkgs> { },
feature,
}:
pkgs.runCommandNoCC "${feature}-present" { requiredSystemFeatures = [ feature ]; } ''
if [[ ! -e /${feature}-files ]]; then
echo "The host declares ${feature} support, but doesn't expose /${feature}-files" >&2
exit 1
fi
libcudaLocation=/run/opengl-driver/lib/libcuda.so
if [[ -e "$libcudaLocation" || -h "$libcudaLocation" ]] ; then
true # we're good
else
echo "The host declares ${feature} support, but it the hook fails to handle the hostPath != guestPath cases" >&2
exit 1
fi
if cat "$libcudaLocation" | xargs test fakeContent = ; then
true # we're good
else
echo "The host declares ${feature} support, but it seems to fail to follow symlinks" >&2
echo "The content of /run/opengl-driver/lib/libcuda.so is: $(cat /run/opengl-driver/lib/libcuda.so)" >&2
exit 1
fi
touch $out
''

View File

@ -0,0 +1,8 @@
{
pkgs ? import <nixpkgs> { },
}:
pkgs.runCommandNoCC "nix-required-mounts-structured-attrs-no-features" { __structuredAttrs = true; }
''
touch $out
''

View File

@ -0,0 +1,18 @@
{
pkgs ? import <nixpkgs> { },
feature,
}:
pkgs.runCommandNoCC "${feature}-present-structured"
{
__structuredAttrs = true;
requiredSystemFeatures = [ feature ];
}
''
if [[ -e /${feature}-files ]]; then
touch $out
else
echo "The host declares ${feature} support, but doesn't expose /${feature}-files" >&2
echo "Do we fail to parse __structuredAttrs=true derivations?" >&2
fi
''

View File

@ -66,7 +66,7 @@ self: let
org = super.org.overrideAttrs (old: {
dontUnpack = false;
patches = old.patches or [ ] ++ [
patches = old.patches or [ ] ++ lib.optionals (lib.versionOlder old.version "9.7.5") [
# security fix backported from 9.7.5
(pkgs.fetchpatch {
url = "https://git.savannah.gnu.org/cgit/emacs/org-mode.git/patch/?id=f4cc61636947b5c2f0afc67174dd369fe3277aa8";

View File

@ -143,7 +143,7 @@ self: let
org = super.org.overrideAttrs (old: {
dontUnpack = false;
patches = old.patches or [ ] ++ [
patches = old.patches or [ ] ++ lib.optionals (lib.versionOlder old.version "9.7.5") [
# security fix backported from 9.7.5
(pkgs.fetchpatch {
url = "https://git.savannah.gnu.org/cgit/emacs/org-mode.git/patch/?id=f4cc61636947b5c2f0afc67174dd369fe3277aa8";

File diff suppressed because it is too large Load Diff

View File

@ -2,7 +2,6 @@
, stdenv
, fetchFromGitLab
, rustPlatform
, appstream-glib
, cargo
, desktop-file-utils
, glib
@ -11,7 +10,6 @@
, pkg-config
, rustc
, wrapGAppsHook4
, gtk4
, libadwaita
, libxml2
, darwin
@ -19,7 +17,7 @@
stdenv.mkDerivation rec {
pname = "emblem";
version = "1.3.0";
version = "1.4.0";
src = fetchFromGitLab {
domain = "gitlab.gnome.org";
@ -27,15 +25,16 @@ stdenv.mkDerivation rec {
owner = "design";
repo = "emblem";
rev = version;
sha256 = "sha256-VA4KZ8x/MMAA/g/x59h1CyHhlj0vbZqwAFdsfTPA2Ds=";
sha256 = "sha256-pW+2kQANZ9M1f0jMoBqCxMjLCu0xAnuEE2EdzDq4ZCE=";
};
cargoDeps = rustPlatform.importCargoLock {
lockFile = ./Cargo.lock;
cargoDeps = rustPlatform.fetchCargoTarball {
inherit src;
name = "${pname}-${version}";
hash = "sha256-2mxDXDGQA2YB+gnGwy6VSZP/RRBKg0RiR1GlXIkio9E=";
};
nativeBuildInputs = [
appstream-glib
desktop-file-utils
glib
meson
@ -48,19 +47,22 @@ stdenv.mkDerivation rec {
];
buildInputs = [
gtk4
libadwaita
libxml2
] ++ lib.optionals stdenv.isDarwin [
darwin.apple_sdk.frameworks.Foundation
];
meta = with lib; {
env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.isDarwin [
"-Wno-error=incompatible-function-pointer-types"
]);
meta = {
description = "Generate project icons and avatars from a symbolic icon";
mainProgram = "emblem";
homepage = "https://gitlab.gnome.org/World/design/emblem";
license = licenses.gpl3Plus;
platforms = platforms.unix;
maintainers = with maintainers; [ figsoda foo-dogsquared ];
license = lib.licenses.gpl3Plus;
platforms = lib.platforms.unix;
maintainers = with lib.maintainers; [ figsoda foo-dogsquared aleksana ];
};
}

View File

@ -32,6 +32,8 @@
, wrapGAppsHook3
, qtwayland
, cairo
, openscad
, runCommand
}:
mkDerivation rec {
@ -69,7 +71,11 @@ mkDerivation rec {
++ lib.optional spacenavSupport libspnav
;
qmakeFlags = [ "VERSION=${version}" ] ++
qmakeFlags = [
"VERSION=${version}"
"LIB3MF_INCLUDEPATH=${lib3mf.dev}/include/lib3mf/Bindings/Cpp"
"LIB3MF_LIBPATH=${lib3mf}/lib"
] ++
lib.optionals spacenavSupport [
"ENABLE_SPNAV=1"
"SPNAV_INCLUDEPATH=${libspnav}/include"
@ -112,4 +118,14 @@ mkDerivation rec {
maintainers = with lib.maintainers; [ bjornfor raskin gebner ];
mainProgram = "openscad";
};
passthru.tests = {
lib3mf_support = runCommand "${pname}-lib3mf-support-test" {
nativeBuildInputs = [ openscad ];
} ''
echo "cube([1, 1, 1]);" | openscad -o cube.3mf -
echo "import(\"cube.3mf\");" | openscad -o cube-import.3mf -
mv cube-import.3mf $out
'';
};
}

View File

@ -7,6 +7,7 @@
SDL,
addOpenGLRunpath,
alembic,
blender,
boost,
brotli,
callPackage,
@ -372,6 +373,20 @@ stdenv.mkDerivation (finalAttrs: {
--render-frame 1
done
'';
tester-cudaAvailable = cudaPackages.writeGpuTestPython { } ''
import subprocess
subprocess.run([${
lib.concatMapStringsSep ", " (x: ''"${x}"'') [
(lib.getExe (blender.override { cudaSupport = true; }))
"--background"
"-noaudio"
"--python-exit-code"
"1"
"--python"
"${./test-cuda.py}"
]
}], check=True) # noqa: E501
'';
};
};
@ -381,7 +396,8 @@ stdenv.mkDerivation (finalAttrs: {
# They comment two licenses: GPLv2 and Blender License, but they
# say: "We've decided to cancel the BL offering for an indefinite period."
# OptiX, enabled with cudaSupport, is non-free.
license = with lib.licenses; [ gpl2Plus ] ++ lib.optional cudaSupport unfree;
license = with lib.licenses; [ gpl2Plus ] ++ lib.optional cudaSupport (unfree // { shortName = "NVidia OptiX EULA"; });
platforms = [
"aarch64-linux"
"x86_64-darwin"

View File

@ -0,0 +1,8 @@
import bpy
preferences = bpy.context.preferences.addons["cycles"].preferences
devices = preferences.get_devices_for_type("CUDA")
ids = [d.id for d in devices]
assert any("CUDA" in i for i in ids), f"CUDA not present in {ids}"
print("CUDA is available")

View File

@ -21,7 +21,7 @@ buildGoModule rec {
homepage = "https://github.com/wakatara/harsh";
changelog = "https://github.com/wakatara/harsh/releases/tag/v${version}";
license = licenses.mit;
maintainers = with maintainers; [ laurailway ];
maintainers = with maintainers; [ ];
mainProgram = "harsh";
};
}

View File

@ -6,13 +6,13 @@
stdenvNoCC.mkDerivation {
pname = "kitty-themes";
version = "0-unstable-2024-06-12";
version = "0-unstable-2024-06-26";
src = fetchFromGitHub {
owner = "kovidgoyal";
repo = "kitty-themes";
rev = "9589f0dffc817d6e8b86a5b2dc56d7c3db201a9b";
hash = "sha256-8bZkYFb/HOIg2Uk7b/Apn30AAlRF0ztLh27AUlHW6Wk=";
rev = "522b2bc8631cfe28a1b230d1b774f911eab17cf3";
hash = "sha256-LYiTp18Qk/rF+n9OuVG4kHDQEbE+ijWKQHA2AIDV4wQ=";
};
dontConfigure = true;

View File

@ -8,16 +8,16 @@
rustPlatform.buildRustPackage rec {
pname = "git-cliff";
version = "2.3.0";
version = "2.4.0";
src = fetchFromGitHub {
owner = "orhun";
repo = "git-cliff";
rev = "v${version}";
hash = "sha256-iTjfFl/bTvyElCIpTj7dsVu3azUSwNTryyssHdCaODg=";
hash = "sha256-JRFd84DR0pLimAslr+LTC2N09sjOuFCXU71hRsEriOs=";
};
cargoHash = "sha256-/Elb/hsk96E7D6TrLgbhD5cQhsXpDigNm5p9FpKGEUQ=";
cargoHash = "sha256-pLbz2z+l8E/R+GffseOacKrjr6ERZf1ETh8tVQjI4TU=";
# attempts to run the program on .git in src which is not deterministic
doCheck = false;

View File

@ -10,14 +10,14 @@
python3Packages.buildPythonApplication rec {
pname = "git-cola";
version = "4.7.1";
version = "4.8.0";
pyproject = true;
src = fetchFromGitHub {
owner = "git-cola";
repo = "git-cola";
rev = "v${version}";
hash = "sha256-93aayGGMgkSghTpx8M5Cfbxf2szAwrSzuoWK6GCTqZ8=";
hash = "sha256-sm/a790PiSqGYbftxvLiLMifKbMyi3a5Rvlhr9plyrU=";
};
buildInputs = lib.optionals stdenv.isLinux [

View File

@ -9,13 +9,13 @@
stdenv.mkDerivation rec {
pname = "obs-vertical-canvas";
version = "1.4.3";
version = "1.4.4";
src = fetchFromGitHub {
owner = "Aitum";
repo = "obs-vertical-canvas";
rev = version;
sha256 = "sha256-nzuPjVwtWGPSNLnWNT4D03j1xZp37HH77t1DnilSQ8E=";
sha256 = "sha256-RBsdYG73SoX+dB4sUq641SL0ETUFE+PVAmr/DaqMuLI=";
};
nativeBuildInputs = [ cmake ];

View File

@ -2,13 +2,13 @@
buildGoModule rec {
pname = "docker-compose";
version = "2.27.2";
version = "2.28.1";
src = fetchFromGitHub {
owner = "docker";
repo = "compose";
rev = "v${version}";
hash = "sha256-QwTn/oAfB1bJkPcI0oDGC4vp0xUQxjhF8+jZ+hqpr5Q=";
hash = "sha256-AfWUCgW+aZkedd94uPpfBKKZC1Xvq9wonuCSXGHm774=";
};
postPatch = ''
@ -16,7 +16,7 @@ buildGoModule rec {
rm -rf e2e/
'';
vendorHash = "sha256-KczMkSwYP9Ng1dYUU7+ig2VRUEOPkaWTV77c9xGqbw0=";
vendorHash = "sha256-MykoU0q2cCnY02a52kyg35L4tJ3KZTzA4usf194Wnbw=";
ldflags = [ "-X github.com/docker/compose/v2/internal.Version=${version}" "-s" "-w" ];

View File

@ -10,16 +10,16 @@
}:
rustPlatform.buildRustPackage rec {
pname = "c2patool";
version = "0.9.3";
version = "0.9.4";
src = fetchFromGitHub {
owner = "contentauth";
repo = pname;
rev = "v${version}";
sha256 = "sha256-SVHz6Zwl4WOgwCYXtGfNJBmlnJUAWfe+NAkgnG/QC8A=";
sha256 = "sha256-GS3R1qqL9h7kVQQXl0GBsdWUI8rwtJvRW4Cfqp+VYNU=";
};
cargoHash = "sha256-+flZXxdN5mcmxMZeIV4J4wc+mYuGf5LuGAw4Kz/faak=";
cargoHash = "sha256-sdlHCPqLsgM1XG3lNfy+ET1xKCKVcdtRcvShxpBW8MQ=";
# use the non-vendored openssl
OPENSSL_NO_VENDOR = 1;

View File

@ -0,0 +1,33 @@
{
lib,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule rec {
pname = "canard";
version = "0.0.2-unstable-2024-04-22";
src = fetchFromGitHub {
owner = "mrusme";
repo = "canard";
rev = "d3c37d11078574ca16b75475b3d08ffe351bc3c2";
hash = "sha256-ICrTEaTYFAViORWvdj4uW2gLgxtWxRlhgu5sifgqGX0=";
};
vendorHash = "sha256-qcfPW7rz0v63QmQQceQltkCFNBUeQTxVerxDymv7SZo=";
ldflags = [
"-s"
"-w"
"-X github.com/mrusme/canard/main.VERSION=${version}"
];
meta = {
description = "Command line TUI client for the journalist RSS aggregator";
homepage = "https://github.com/mrusme/canard";
license = lib.licenses.gpl3Only;
maintainers = with lib.maintainers; [ moraxyc ];
mainProgram = "canard";
};
}

View File

@ -9,16 +9,16 @@
rustPlatform.buildRustPackage rec {
pname = "clipcat";
version = "0.18.0";
version = "0.18.1";
src = fetchFromGitHub {
owner = "xrelkd";
repo = pname;
rev = "v${version}";
hash = "sha256-i+5hUwarJHa3QzHPqJ0N/gztKWoRCKXsEbX3Q/1PQ9Q=";
hash = "sha256-rftAGrquvNPRu49rDUaPVO7EUMCvcLoV0w801BBOG8c=";
};
cargoHash = "sha256-lPH2v+OfO/NCLdAVvPbIgAeVAOWHjhNIOap94p0+NR0=";
cargoHash = "sha256-Amm/NnJSnqB5q+bxRJ5A6GKOFhIGTq1OSXESF5r22bI=";
buildInputs = lib.optionals stdenv.isDarwin [
darwin.apple_sdk.frameworks.Cocoa

View File

@ -10,17 +10,17 @@
}:
rustPlatform.buildRustPackage rec {
pname = "codeberg-cli";
version = "0.4.0";
version = "0.4.2";
src = fetchFromGitea {
domain = "codeberg.org";
owner = "RobWalt";
repo = "codeberg-cli";
rev = "v${version}";
hash = "sha256-g5V3Noqh7Y9v/t/dt7n45/NblqNtpZCKELPc9DOkb8A=";
hash = "sha256-SUKV7tH7tvSPtlMcRlOgjvAEqPoBi4J41Ak5k4h4Qj0=";
};
cargoHash = "sha256-zTg/3PcFWzBmKZA7lRIpM3P03d1qpNVBczqWFbnxpic=";
cargoHash = "sha256-FlW0Q2UUt6AX/A0MznGpJY8+yoMs70N58Ow05ly9YyE=";
nativeBuildInputs = [
pkg-config
installShellFiles

View File

@ -5,11 +5,11 @@
let
pname = "codux";
version = "15.29.0";
version = "15.29.1";
src = fetchurl {
url = "https://github.com/wixplosives/codux-versions/releases/download/${version}/Codux-${version}.x86_64.AppImage";
sha256 = "sha256-BvDrhs37XGCQdQV2yQJZXlnNWVArFCMLfFlXuXz9ea0=";
sha256 = "sha256-wiAME0jNtqGbMk6w1jzKUZUzhS0Gg5FgqXD1vuRSpxo=";
};
appimageContents = appimageTools.extractType2 { inherit pname version src; };

View File

@ -0,0 +1,31 @@
{
lib,
stdenv,
fetchFromGitHub,
curl,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "concord";
version = "2.2.1";
src = fetchFromGitHub {
owner = "Cogmasters";
repo = "concord";
rev = "refs/tags/v${finalAttrs.version}";
hash = "sha256-8k/W6007U1/s3vx03i1929a5RKZtpW/jOr4JDwmzwp8=";
};
makeFlags = [ "PREFIX=${placeholder "out"}" ];
buildInputs = [ curl ];
meta = {
description = "Discord API wrapper library made in C";
homepage = "https://cogmasters.github.io/concord/";
changelog = "https://github.com/Cogmasters/concord/releases/tag/v${finalAttrs.version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ emneo ];
platforms = lib.platforms.unix;
};
})

View File

@ -1,28 +1,32 @@
{ lib
, stdenv
, fetchFromGitHub
{
lib,
stdenv,
fetchFromGitHub,
, docbook_xml_dtd_45
, docbook_xsl
, installShellFiles
, libxslt
, pcre
, pkg-config
, python3
, which
docbook_xml_dtd_45,
docbook_xsl,
installShellFiles,
libxslt,
pcre,
pkg-config,
python3,
which,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "cppcheck";
version = "2.14.1";
version = "2.14.2";
outputs = [ "out" "man" ];
outputs = [
"out"
"man"
];
src = fetchFromGitHub {
owner = "danmar";
repo = "cppcheck";
rev = finalAttrs.version;
hash = "sha256-KXE3zmhaTweQhs0Qh7Xd5ILiuGVewtrvOkRkt8hjU58=";
hash = "sha256-aVjQqwsTw6TCLxs2oQif3hX5kfXHua7ekBpO/PyneAQ=";
};
nativeBuildInputs = [
@ -40,7 +44,12 @@ stdenv.mkDerivation (finalAttrs: {
(python3.withPackages (ps: [ ps.pygments ]))
];
makeFlags = [ "PREFIX=$(out)" "MATCHCOMPILER=yes" "FILESDIR=$(out)/share/cppcheck" "HAVE_RULES=yes" ];
makeFlags = [
"PREFIX=$(out)"
"MATCHCOMPILER=yes"
"FILESDIR=$(out)/share/cppcheck"
"HAVE_RULES=yes"
];
enableParallelBuilding = true;
strictDeps = true;
@ -73,13 +82,16 @@ stdenv.mkDerivation (finalAttrs: {
meta = {
description = "Static analysis tool for C/C++ code";
homepage = "http://cppcheck.sourceforge.net";
license = lib.licenses.gpl3Plus;
longDescription = ''
Check C/C++ code for memory leaks, mismatching allocation-deallocation,
buffer overruns and more.
'';
maintainers = with lib.maintainers; [ joachifm paveloom ];
homepage = "http://cppcheck.sourceforge.net";
license = lib.licenses.gpl3Plus;
maintainers = with lib.maintainers; [
joachifm
paveloom
];
platforms = lib.platforms.unix;
};
})

View File

@ -9,13 +9,13 @@
buildGoModule rec {
pname = "cue";
version = "0.9.1";
version = "0.9.2";
src = fetchFromGitHub {
owner = "cue-lang";
repo = "cue";
rev = "v${version}";
hash = "sha256-hhu66uiBkxyYRw8eruqxVifr2yftDXcYRTK5VYbjRPQ=";
hash = "sha256-C3BvI43oo71y19ZRflqhKRQF7DwBBOV0yRlutv+W18g=";
};
vendorHash = "sha256-FsFignBh669E60S8l8siQHLzeSfB5X/XOHBXPMDX3Cg=";

View File

@ -17,16 +17,16 @@
rustPlatform.buildRustPackage rec {
pname = "eza";
version = "0.18.19";
version = "0.18.20";
src = fetchFromGitHub {
owner = "eza-community";
repo = "eza";
rev = "v${version}";
hash = "sha256-UP0z7rcOmwKqpmKkQy5/6W+XWKfAiEQifKOnrdCgBYo=";
hash = "sha256-yhrzjm6agMshdjCkK88aGXd0aM9Uurs1GeAA3w/umqI=";
};
cargoHash = "sha256-x53sQ/DEx7SkQ8vECg/5lkcdJA3WbcDaYapbXub+9nA=";
cargoHash = "sha256-AJH+fZFaSSgRLIsDu5GVe4d9MI2e4N2DvWZ2JOZx+pM=";
nativeBuildInputs = [ cmake pkg-config installShellFiles pandoc ];
buildInputs = [ zlib ]

View File

@ -7,13 +7,13 @@
}:
stdenv.mkDerivation (finalAttrs: {
pname = "fennel-ls";
version = "0.1.2";
version = "0.1.3";
src = fetchFromSourcehut {
owner = "~xerool";
repo = "fennel-ls";
rev = finalAttrs.version;
hash = "sha256-8TDJ03x9dkfievbovzMN3JRfIKba3CfzbcRAZOuPbKs=";
hash = "sha256-7NifEbOH8TDzon3f6w4I/7uryE1e9M5iYvqEb0hLv5s=";
};
buildInputs = [
lua
@ -22,12 +22,12 @@ stdenv.mkDerivation (finalAttrs: {
makeFlags = [ "PREFIX=$(out)" ];
installFlags = [ "PREFIX=$(out)" ];
meta = with lib; {
meta = {
description = "Language server for intelligent editing of the Fennel Programming Language";
homepage = "https://git.sr.ht/~xerool/fennel-ls/";
license = licenses.mit;
changelog = "https://git.sr.ht/~xerool/fennel-ls/refs/${version}";
maintainers = with maintainers; [
license = lib.licenses.mit;
changelog = "https://git.sr.ht/~xerool/fennel-ls/refs/${finalAttrs.version}";
maintainers = with lib.maintainers; [
luftmensch-luftmensch
yisraeldov
];

View File

@ -10,16 +10,16 @@
rustPlatform.buildRustPackage rec {
pname = "fzf-make";
version = "0.34.0";
version = "0.35.0";
src = fetchFromGitHub {
owner = "kyu08";
repo = "fzf-make";
rev = "v${version}";
hash = "sha256-x+y0K6b/yCskowOuvjcSCJXM5ym2Qn84/Thui0ahUKU=";
hash = "sha256-hrPBuNCtwYOynv0JUcEq0lVZ9k3iVPNyn04l8zVbkN4=";
};
cargoHash = "sha256-cIoc3sGy33iTkVAln4oSYSBGB0iAFanv746upxnv0ZA=";
cargoHash = "sha256-O7rQp70ukw7LiC+m7rlqEGHVJw3Lo93WEmL3PFD7kBM=";
nativeBuildInputs = [ makeBinaryWrapper ];

View File

@ -13,7 +13,7 @@ let
maintainers
;
version = "0.2.4";
version = "0.2.5";
in
rustPlatform.buildRustPackage {
pname = "git-instafix";
@ -23,10 +23,10 @@ rustPlatform.buildRustPackage {
owner = "quodlibetor";
repo = "git-instafix";
rev = "v${version}";
hash = "sha256-lrGWt3y8IbGzOjp6k3nZD4CnC1S9aMpJPwNL/Mik5Lw=";
hash = "sha256-tizA5BLZZ/9gfHv2X8is7EJD1reMvfA7c6JETUoUgvI=";
};
cargoHash = "sha256-+mBxHC7AzHuQ/k9OwT92iL25aW0WXyPcG5SOsWdgV5U=";
cargoHash = "sha256-kIIwswj8mfpY382O0bdMoSk6+T+614l2QCeRgz3ZxEY=";
buildInputs = [ libgit2 ];
nativeCheckInputs = [ git ];

View File

@ -1,19 +1,31 @@
{ lib, rustPlatform, fetchFromGitHub, shared-mime-info, libiconv, installShellFiles }:
{
lib,
rustPlatform,
fetchFromGitHub,
shared-mime-info,
libiconv,
installShellFiles,
nix-update-script,
}:
rustPlatform.buildRustPackage rec {
pname = "handlr-regex";
version = "0.10.0";
version = "0.10.1";
src = fetchFromGitHub {
owner = "Anomalocaridid";
repo = pname;
rev = "v${version}";
hash = "sha256-RCMTRf/mrLCDrmJSAofTgCHKK4GogkdGXnN4lFFQMA8=";
hash = "sha256-6ASljvJF/qbl8nvAZKQ2rQ8CQPovTF7FLKp8enIjIP4=";
};
cargoHash = "sha256-GHRryBeofZQbVTyOwMwYKVAymui8VvsUQhiwGu0+HEE=";
cargoHash = "sha256-4tm7N8l7ScKhhOFxt/1ssArdF9fgvCyrDrBASaiOusI=";
nativeBuildInputs = [
installShellFiles
shared-mime-info
];
nativeBuildInputs = [ installShellFiles shared-mime-info ];
buildInputs = [ libiconv ];
preCheck = ''
@ -29,6 +41,8 @@ rustPlatform.buildRustPackage rec {
installManPage assets/manual/man1/*
'';
passthru.updateScript = nix-update-script { };
meta = with lib; {
description = "Fork of handlr with support for regex";
homepage = "https://github.com/Anomalocaridid/handlr-regex";

View File

@ -10,16 +10,16 @@
buildGoModule rec {
pname = "hugo";
version = "0.127.0";
version = "0.128.0";
src = fetchFromGitHub {
owner = "gohugoio";
repo = "hugo";
rev = "refs/tags/v${version}";
hash = "sha256-QAZP119VOPTnVXe2mtzCpB3OW/g73oA/qwR94OzISKo=";
hash = "sha256-dyiCEWOiUtRppKgpqI68kC7Hv1AMK76kvCEaS8nIIJM=";
};
vendorHash = "sha256-Og7FTCrto1l+Xpfr2zEgg/yXa7dflws0yJ2Xh9f3mbI=";
vendorHash = "sha256-iNI/5uAYMG+bfndpD17dp1v3rGbFdHnG9oQv/grb/XY=";
doCheck = false;

View File

@ -1,27 +0,0 @@
{ lib
, buildGoModule
, fetchFromGitHub
}:
buildGoModule rec {
pname = "kcl-cli";
version = "0.8.9";
src = fetchFromGitHub {
owner = "kcl-lang";
repo = "cli";
rev = "v${version}";
hash = "sha256-slU3n7YCV5VfvXArzlcITb9epdu/gyXlAWq9KLjGdJA=";
};
vendorHash = "sha256-Xv8Tfq9Kb1xGFCWZQwBFDX9xZW9j99td/DUb7jBtkpE=";
ldflags = [
"-X=kcl-lang.io/cli/pkg/version.version=${version}"
];
subPackages = [ "cmd/kcl" ];
meta = with lib; {
description = "Command line interface for KCL programming language";
homepage = "https://github.com/kcl-lang/cli";
license = licenses.asl20;
maintainers = with maintainers; [ peefy ];
mainProgram = "kcl";
};
}

View File

@ -0,0 +1,56 @@
{ lib
, buildGoModule
, fetchFromGitHub
, kclvm_cli
, kclvm
, makeWrapper
, installShellFiles
,
}:
buildGoModule rec {
pname = "kcl";
version = "0.8.9";
src = fetchFromGitHub {
owner = "kcl-lang";
repo = "cli";
rev = "v${version}";
hash = "sha256-slU3n7YCV5VfvXArzlcITb9epdu/gyXlAWq9KLjGdJA=";
};
vendorHash = "sha256-Xv8Tfq9Kb1xGFCWZQwBFDX9xZW9j99td/DUb7jBtkpE=";
ldflags = [
"-w -s"
"-X=kcl-lang.io/cli/pkg/version.version=v${version}"
];
nativeBuildInputs = [ makeWrapper installShellFiles ];
buildInputs = [ kclvm kclvm_cli ];
subPackages = [ "cmd/kcl" ];
# env vars https://github.com/kcl-lang/kcl-go/blob/main/pkg/env/env.go#L29
postFixup = ''
wrapProgram $out/bin/kcl \
--set PATH ${lib.makeBinPath [kclvm_cli]} \
--set KCL_LIB_HOME ${lib.makeLibraryPath [kclvm]} \
--set KCL_GO_DISABLE_INSTALL_ARTIFACT false \
'';
postInstall = ''
installShellCompletion --cmd kcl \
--bash <($out/bin/kcl completion bash) \
--fish <($out/bin/kcl completion fish) \
--zsh <($out/bin/kcl completion zsh)
'';
meta = with lib; {
description = "A command line interface for KCL programming language";
homepage = "https://github.com/kcl-lang/cli";
license = licenses.asl20;
platforms = platforms.linux;
maintainers = with maintainers; [ selfuryon peefy ];
mainProgram = "kcl";
};
}

4375
pkgs/by-name/kc/kclvm/Cargo.lock generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,37 @@
diff --git a/api/build.rs b/api/build.rs
index 617c1b9a..20d728e3 100644
--- a/api/build.rs
+++ b/api/build.rs
@@ -5,10 +5,10 @@ use prost_wkt_build::{FileDescriptorSet, Message};
/// According to the file kclvm/spec/gpyrpc/gpyrpc.proto, automatically generate
/// the corresponding rust source file to the directory src/model
fn main() {
- std::env::set_var(
- "PROTOC",
- protoc_bin_vendored::protoc_bin_path().unwrap().as_os_str(),
- );
+ // std::env::set_var(
+ // "PROTOC",
+ // protoc_bin_vendored::protoc_bin_path().unwrap().as_os_str(),
+ // );
let out = PathBuf::from(env::var("OUT_DIR").unwrap());
let descriptor_file = out.join("kclvm_service_descriptor.bin");
diff --git b/third-party/prost-wkt/wkt-types/build.rs a/third-party/prost-wkt/wkt-types/build.rs
index e49222d5..a933ddf4 100644
--- a/third-party/prost-wkt/wkt-types/build.rs
+++ b/third-party/prost-wkt/wkt-types/build.rs
@@ -13,10 +13,10 @@ use regex::Regex;
fn main() {
//hack: set protoc_bin_vendored::protoc_bin_path() to PROTOC
- std::env::set_var(
- "PROTOC",
- protoc_bin_vendored::protoc_bin_path().unwrap().as_os_str(),
- );
+ // std::env::set_var(
+ // "PROTOC",
+ // protoc_bin_vendored::protoc_bin_path().unwrap().as_os_str(),
+ // );
let dir = PathBuf::from(env::var("OUT_DIR").unwrap());
process_prost_pbtime(&dir);

View File

@ -0,0 +1,41 @@
{ lib
, rustPlatform
, fetchFromGitHub
, protobuf
, pkg-config
,
}:
rustPlatform.buildRustPackage rec {
pname = "kclvm";
version = "0.8.7";
src = fetchFromGitHub {
owner = "kcl-lang";
repo = "kcl";
rev = "v${version}";
hash = "sha256-ieGpuNkzT6AODZYUcEanb7Jpb+PXclnQ9KkdmlehK0o=";
};
sourceRoot = "source/kclvm";
cargoLock = {
lockFile = ./Cargo.lock;
outputHashes = {
"inkwell-0.2.0" = "sha256-JxSlhShb3JPhsXK8nGFi2uGPp8XqZUSiqniLBrhr+sM=";
};
};
nativeBuildInputs = [ pkg-config protobuf ];
patches = [ ./enable_protoc_env.patch ];
PROTOC = "${protobuf}/bin/protoc";
PROTOC_INCLUDE = "${protobuf}/include";
meta = with lib; {
description = "A high-performance implementation of KCL written in Rust that uses LLVM as the compiler backend";
homepage = "https://github.com/kcl-lang/kcl";
license = licenses.asl20;
platforms = platforms.linux;
maintainers = with maintainers; [ selfuryon peefy ];
};
}

7
pkgs/by-name/kc/kclvm_cli/Cargo.lock generated Normal file
View File

@ -0,0 +1,7 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 3
[[package]]
name = "kclvm_cli"
version = "0.8.7"

View File

@ -0,0 +1,10 @@
--- /dev/null 2024-03-29 17:01:59.989114590 +0100
+++ cli/Cargo.lock 2024-04-17 13:27:32.243365234 +0200
@@ -0,0 +1,7 @@
+# This file is automatically @generated by Cargo.
+# It is not intended for manual editing.
+version = 3
+
+[[package]]
+name = "kclvm_cli"
+version = "0.8.7"

View File

@ -0,0 +1,31 @@
{ lib
, rustPlatform
, fetchFromGitHub
, kclvm
}:
rustPlatform.buildRustPackage rec {
pname = "kclvm_cli";
version = "0.8.7";
src = fetchFromGitHub {
owner = "kcl-lang";
repo = "kcl";
rev = "v${version}";
hash = "sha256-ieGpuNkzT6AODZYUcEanb7Jpb+PXclnQ9KkdmlehK0o=";
};
sourceRoot = "source/cli";
cargoLock.lockFile = ./Cargo.lock;
cargoPatches = [ ./cargo_lock.patch ];
buildInputs = [ kclvm ];
meta = with lib; {
description = "A high-performance implementation of KCL written in Rust that uses LLVM as the compiler backend";
homepage = "https://github.com/kcl-lang/kcl";
license = licenses.asl20;
platforms = platforms.linux;
maintainers = with maintainers; [ selfuryon peefy ];
mainProgram = "kclvm_cli";
};
}

View File

@ -0,0 +1,70 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
pkg-config,
curl,
boost,
liboauth,
jsoncpp,
htmlcxx,
rhash,
tinyxml-2,
help2man,
html-tidy,
libsForQt5,
testers,
lgogdownloader,
enableGui ? true,
}:
stdenv.mkDerivation rec {
pname = "lgogdownloader";
version = "3.14";
src = fetchFromGitHub {
owner = "Sude-";
repo = "lgogdownloader";
rev = "refs/tags/v${version}";
hash = "sha256-pxYiSefscglHN53wvp38Ec4/3X46sWc56Y4YKNtqABQ=";
};
nativeBuildInputs = [
cmake
pkg-config
help2man
html-tidy
] ++ lib.optional enableGui libsForQt5.wrapQtAppsHook;
buildInputs =
[
boost
curl
htmlcxx
jsoncpp
liboauth
rhash
tinyxml-2
]
++ lib.optionals enableGui [
libsForQt5.qtbase
libsForQt5.qtwebengine
];
cmakeFlags = lib.optional enableGui "-DUSE_QT_GUI=ON";
passthru.tests = {
version = testers.testVersion { package = lgogdownloader; };
};
meta = {
description = "Unofficial downloader to GOG.com for Linux users. It uses the same API as the official GOGDownloader";
mainProgram = "lgogdownloader";
homepage = "https://github.com/Sude-/lgogdownloader";
license = lib.licenses.wtfpl;
maintainers = with lib.maintainers; [ _0x4A6F ];
platforms = lib.platforms.linux;
};
}

View File

@ -0,0 +1,40 @@
{
stdenvNoCC,
lib,
fetchurl,
unzip,
}:
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "loopwm";
version = "1.0.0";
src = fetchurl {
url = "https://github.com/MrKai77/Loop/releases/download/${finalAttrs.version}/Loop.zip";
hash = "sha256-1DQ6O6QkD04/meS0XaS0+vpr+vd5cfwGSehV8QVgYtI=";
};
sourceRoot = ".";
nativeBuildInputs = [ unzip ];
dontPatch = true;
dontConfigure = true;
dontBuild = true;
installPhase = ''
runHook preInstall
mkdir -p $out/Applications
cp -r Loop.app $out/Applications
runHook postInstall
'';
meta = {
description = "macOS Window management made elegant";
homepage = "https://github.com/MrKai77/Loop";
license = lib.licenses.gpl3Only;
maintainers = with lib.maintainers; [ matteopacini ];
platforms = lib.platforms.darwin;
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
};
})

View File

@ -0,0 +1,49 @@
{
lib,
python3Packages,
fetchFromGitHub,
procps,
}:
python3Packages.buildPythonApplication rec {
pname = "mackup";
version = "0.8.40";
pyproject = true;
src = fetchFromGitHub {
owner = "lra";
repo = "mackup";
rev = "refs/tags/${version}";
hash = "sha256-hAIl9nGFRaROlt764IZg4ejw+b1dpnYpiYq4CB9dJqQ=";
};
postPatch = ''
substituteInPlace mackup/utils.py \
--replace-fail '"/usr/bin/pgrep"' '"${lib.getExe' procps "pgrep"}"'
'';
nativeBuildInputs = with python3Packages; [
poetry-core
pythonRelaxDepsHook
nose
];
propagatedBuildInputs = with python3Packages; [
six
docopt
];
pythonImportsCheck = [ "mackup" ];
checkPhase = ''
nosetests
'';
meta = {
description = "A tool to keep your application settings in sync (OS X/Linux)";
changelog = "https://github.com/lra/mackup/releases/tag/${version}";
license = lib.licenses.agpl3Only;
homepage = "https://github.com/lra/mackup";
maintainers = with lib.maintainers; [ luftmensch-luftmensch ];
mainProgram = "mackup";
};
}

View File

@ -0,0 +1,62 @@
{ lib, stdenv, libsForQt5, makeDesktopItem, copyDesktopItems, fetchFromGitHub, cmake, kmod }:
stdenv.mkDerivation (finalAttrs: {
pname = "mcontrolcenter";
version = "0.4.1";
src = fetchFromGitHub {
owner = "dmitry-s93";
repo = "MControlCenter";
rev = finalAttrs.version;
hash = "sha256-SV78OVRGzy2zFLT3xqeUtbjlh81Z97PVao18P3h/8dI=";
};
postPatch = ''
substituteInPlace src/helper/helper.cpp \
--replace-fail "/usr/sbin/modprobe" "${kmod}/bin/modprobe"
substituteInPlace src/helper/mcontrolcenter.helper.service \
--replace-fail "/usr" "$out"
'';
desktopItems = [
(makeDesktopItem {
name = "MControlCenter";
exec = "mcontrolcenter";
icon = "mcontrolcenter";
comment = finalAttrs.meta.description;
desktopName = "MControlCenter";
categories = [ "System" ];
})
];
nativeBuildInputs = [
libsForQt5.wrapQtAppsHook
libsForQt5.qttools
copyDesktopItems
cmake
];
buildInputs = [
libsForQt5.qtbase
kmod
];
installPhase = ''
runHook preInstall
install -Dm755 mcontrolcenter $out/bin/mcontrolcenter
install -Dm755 helper/mcontrolcenter-helper $out/libexec/mcontrolcenter-helper
install -Dm644 ../resources/mcontrolcenter.svg $out/share/icons/hicolor/scalable/apps/mcontrolcenter.svg
install -Dm644 ../src/helper/mcontrolcenter-helper.conf $out/share/dbus-1/system.d/mcontrolcenter-helper.conf
install -Dm644 ../src/helper/mcontrolcenter.helper.service $out/share/dbus-1/system-services/mcontrolcenter.helper.service
runHook postInstall
'';
meta = {
homepage = "https://github.com/dmitry-s93/MControlCenter";
description = "Tool to change the settings of MSI laptops running Linux";
license = lib.licenses.gpl3Plus;
platforms = lib.platforms.linux;
maintainers = [ lib.maintainers.Tommimon ];
mainProgram = "mcontrolcenter";
};
})

View File

@ -0,0 +1,57 @@
From 5a886abd956607503e9dc7cd22923eaf8b01e46f Mon Sep 17 00:00:00 2001
From: Pavel Sobolev <contact@paveloom.dev>
Date: Mon, 3 Jun 2024 20:31:27 +0300
Subject: [PATCH] Disable tests that require network access.
---
tests/integration/meson.build | 2 --
tests/libutils/test.cpp | 20 --------------------
2 files changed, 22 deletions(-)
diff --git a/tests/integration/meson.build b/tests/integration/meson.build
index da1b3b76..8908e690 100644
--- a/tests/integration/meson.build
+++ b/tests/integration/meson.build
@@ -51,8 +51,6 @@ wrap_files = files(
'wrap-test/vorbis.wrap',
)
-test('wrap-test', wrap_tester, args: [wrap_files], timeout: 200000)
-
partial_interpreter_tests = [
[
'foreach',
diff --git a/tests/libutils/test.cpp b/tests/libutils/test.cpp
index 2b20191c..c313312b 100644
--- a/tests/libutils/test.cpp
+++ b/tests/libutils/test.cpp
@@ -131,26 +131,6 @@ TEST(UtilsTest, testMergingDirectories) {
ASSERT_EQ('a', std::ifstream(outputDir / "i1/a.txt").get());
}
-TEST(UtilsTest, testDownloadAndExtraction) {
- auto zipFileName = std::filesystem::path{randomFile() + "-1"};
- auto result = downloadFile(
- "https://github.com/JCWasmx86/mesonlsp/archive/refs/heads/main.zip",
- zipFileName);
- ASSERT_TRUE(result);
- auto directoryName = std::filesystem::path{randomFile() + "-2"};
- std::filesystem::create_directory(directoryName);
- result = extractFile(zipFileName, directoryName);
- ASSERT_TRUE(result);
- auto mustExist =
- directoryName / "mesonlsp-main/Benchmarks/extract_git_data.sh";
- ASSERT_TRUE(std::filesystem::exists(mustExist));
- auto mustFailFilename = std::filesystem::path{randomFile() + "-3"};
- result =
- downloadFile("lnfvwoefvnwefvwvipwnefv2efvpov2nvov", mustFailFilename);
- ASSERT_FALSE(result);
- ASSERT_FALSE(std::filesystem::exists(mustFailFilename));
-}
-
int main(int argc, char **argv) {
testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
--
2.45.1

View File

@ -0,0 +1,170 @@
{
lib,
stdenv,
fetchFromGitHub,
gtest,
makeWrapper,
meson,
ninja,
pkg-config,
python3,
curl,
libarchive,
libossp_uuid,
libpkgconf,
libuuid,
nlohmann_json,
pkgsStatic,
mesonlsp,
nix-update-script,
testers,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "mesonlsp";
version = "4.2.2";
src = fetchFromGitHub {
owner = "JCWasmx86";
repo = "mesonlsp";
rev = "v${finalAttrs.version}";
hash = "sha256-pN8MCqrRfVpmM8KWa7HPTghoegplM4bP/HRVJVs05iE=";
};
patches = [
./disable-tests-that-require-network-access.patch
./simplify-the-format-header-polyfill.patch
];
nativeBuildInputs = [
gtest
makeWrapper
meson
ninja
pkg-config
python3
];
buildInputs =
[
curl
libarchive
libpkgconf
nlohmann_json
]
++ lib.optionals stdenv.isDarwin [
libossp_uuid
pkgsStatic.fmt
]
++ lib.optionals stdenv.isLinux [ libuuid ];
mesonFlags = [ "-Dbenchmarks=false" ];
mesonCheckFlags = [ "--print-errorlogs" ];
doCheck = true;
postUnpack =
let
ada = fetchFromGitHub {
owner = "ada-url";
repo = "ada";
rev = "v2.7.4";
hash = "sha256-V5LwL03x7/a9Lvg1gPvgGipo7IICU7xyO2D3GqP6Lbw=";
};
muon = fetchFromGitHub {
owner = "JCWasmx86";
repo = "muon";
rev = "62af239567ec3b086bae7f02d4aed3a545949155";
hash = "sha256-k883mKwuP35f0WtwX8ybl9uYbvA3y6Vxtv2EJMpZDEs=";
};
sha256 = fetchFromGitHub {
owner = "amosnier";
repo = "sha-2";
rev = "49265c656f9b370da660531db8cc6bf0a2e110a6";
hash = "sha256-X9M/ZATYXUiE4oGorPBnsdaKnKaObarnMRh6QEfkBls=";
};
tomlplusplus = fetchFromGitHub {
owner = "marzer";
repo = "tomlplusplus";
rev = "v3.4.0";
hash = "sha256-h5tbO0Rv2tZezY58yUbyRVpsfRjY3i+5TPkkxr6La8M=";
};
tree-sitter = fetchFromGitHub {
owner = "tree-sitter";
repo = "tree-sitter";
rev = "v0.20.8";
hash = "sha256-278zU5CLNOwphGBUa4cGwjBqRJ87dhHMzFirZB09gYM=";
};
tree-sitter-ini = fetchFromGitHub {
owner = "JCWasmx86";
repo = "tree-sitter-ini";
rev = "20aa563306e9406ac55babb4474521060df90a30";
hash = "sha256-1hHjtghBIf7lOPpupT1pUCZQCnzUi4Qt/yHSCdjMhCU=";
};
tree-sitter-meson = fetchFromGitHub {
owner = "JCWasmx86";
repo = "tree-sitter-meson";
rev = "09665faff74548820c10d77dd8738cd76d488572";
hash = "sha256-ice2NdK1/U3NylIQDnNCN41rK/G6uqFOX+OeNf3zm18=";
};
in
''
(
cd "$sourceRoot/subprojects"
cp -R --no-preserve=mode,ownership ${ada} ada
cp "packagefiles/ada/meson.build" ada
cp -R --no-preserve=mode,ownership ${muon} muon
cp -R --no-preserve=mode,ownership ${sha256} sha256
cp "packagefiles/sha256/meson.build" sha256
cp -R --no-preserve=mode,ownership ${tomlplusplus} tomlplusplus-3.4.0
cp -R --no-preserve=mode,ownership ${tree-sitter} tree-sitter-0.20.8
cp "packagefiles/tree-sitter-0.20.8/meson.build" tree-sitter-0.20.8
cp -R --no-preserve=mode,ownership ${tree-sitter-ini} tree-sitter-ini
cp "packagefiles/tree-sitter-ini/meson.build" tree-sitter-ini
cp -R --no-preserve=mode,ownership ${tree-sitter-meson} tree-sitter-meson
cp "packagefiles/tree-sitter-meson/meson.build" tree-sitter-meson
)
'';
postPatch = ''
substituteInPlace subprojects/muon/include/compilers.h \
--replace-fail 'compiler_language new' 'compiler_language new_'
patchShebangs src/libtypenamespace
'';
passthru = {
updateScript = nix-update-script { };
tests.version = testers.testVersion {
package = mesonlsp;
version = "v${finalAttrs.version}";
};
};
meta = with lib; {
description = "An unofficial, unendorsed language server for Meson written in C++";
homepage = "https://github.com/JCWasmx86/mesonlsp";
changelog = "https://github.com/JCWasmx86/mesonlsp/releases/tag/v${finalAttrs.version}";
license = licenses.gpl3Plus;
mainProgram = "mesonlsp";
maintainers = with maintainers; [ paveloom ];
platforms = platforms.unix;
};
})

View File

@ -0,0 +1,47 @@
From ae3fb8943dd5b2d282a2c6d4525a8ce0dd0244e8 Mon Sep 17 00:00:00 2001
From: Pavel Sobolev <contact@paveloom.dev>
Date: Tue, 25 Jun 2024 23:03:50 +0300
Subject: [PATCH] Simplify the `<format>` header polyfill.
---
src/polyfill/polyfill.hpp | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)
diff --git a/src/polyfill/polyfill.hpp b/src/polyfill/polyfill.hpp
index 5c5ba39a..b5d145ed 100644
--- a/src/polyfill/polyfill.hpp
+++ b/src/polyfill/polyfill.hpp
@@ -1,9 +1,6 @@
#pragma once
#if defined(__APPLE__)
-#if __has_include(<format>) and !defined(__x86_64__)
-#include <format>
-#else
#include <chrono>
#include <fmt/core.h>
@@ -23,10 +20,8 @@ struct fmt::formatter<std::chrono::time_point<Clock, Duration>> {
return fmt::format_to(ctx.out(), "{}", tp.time_since_epoch().count());
}
};
-#endif
-#else
+#elif defined(_WIN32)
#include <format>
-#ifdef _WIN32
template <> struct std::formatter<wchar_t *> {
constexpr auto parse(format_parse_context &ctx) { return ctx.begin(); }
@@ -35,6 +30,6 @@ template <> struct std::formatter<wchar_t *> {
return std::format_to(ctx.out(), L"{}", str);
}
};
-
-#endif
+#else
+#include <format>
#endif
--
2.45.1

View File

@ -33,7 +33,7 @@ xorg,
}:
let
version = "1.43.0";
version = "1.43.2";
rpath = lib.makeLibraryPath [
alsa-lib
@ -82,20 +82,25 @@ let
if stdenv.hostPlatform.system == "x86_64-linux" then
fetchurl {
url = "https://downloads.mongodb.com/compass/mongodb-compass_${version}_amd64.deb";
sha256 = "sha256-hzPhF0NGwv+Lm+q5SoS8qv10UmuKf4RarGMkEeCxp9w=";
hash = "sha256-idOFt60MlspB8Bm9HbLAhd/F1zhkHSVmdTxvCsgjGvk=";
}
else
throw "MongoDB compass is not supported on ${stdenv.hostPlatform.system}";
# NOTE While MongoDB Compass is available to darwin, I do not have resources to test it
# Feel free to make a PR adding support if desired
in stdenv.mkDerivation {
in
stdenv.mkDerivation {
pname = "mongodb-compass";
inherit version;
inherit src;
buildInputs = [ dpkg wrapGAppsHook3 gtk3 ];
buildInputs = [
dpkg
wrapGAppsHook3
gtk3
];
dontUnpack = true;
buildCommand = ''
@ -127,12 +132,12 @@ in stdenv.mkDerivation {
wrapGAppsHook $out/bin/mongodb-compass
'';
meta = with lib; {
meta = {
description = "GUI for MongoDB";
maintainers = with maintainers; [ bryanasdev000 ];
maintainers = with lib.maintainers; [ bryanasdev000 ];
homepage = "https://github.com/mongodb-js/compass";
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
license = licenses.sspl;
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
license = lib.licenses.sspl;
platforms = [ "x86_64-linux" ];
mainProgram = "mongodb-compass";
};

View File

@ -0,0 +1,53 @@
{
lib,
buildGoModule,
fetchFromGitHub,
testers,
mosdns,
stdenv,
installShellFiles,
}:
buildGoModule rec {
pname = "mosdns";
version = "5.3.1";
src = fetchFromGitHub {
owner = "IrineSistiana";
repo = "mosdns";
rev = "refs/tags/v${version}";
hash = "sha256-QujkDx899GAImEtQE28ru7H0Zym5SYXJbJEfSBkJYjo=";
};
vendorHash = "sha256-0J5hXb1W8UruNG0KFaJBOQwHl2XiWg794A6Ktgv+ObM=";
nativeBuildInputs = [ installShellFiles ];
ldflags = [
"-s"
"-w"
"-X main.version=${version}"
];
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd mosdns \
--bash <($out/bin/mosdns completion bash) \
--fish <($out/bin/mosdns completion fish) \
--zsh <($out/bin/mosdns completion zsh)
'';
passthru.tests = {
version = testers.testVersion {
package = mosdns;
command = "${lib.getExe mosdns} version";
};
};
meta = {
description = "Modular, pluggable DNS forwarder";
homepage = "https://github.com/IrineSistiana/mosdns";
license = lib.licenses.gpl3Only;
maintainers = with lib.maintainers; [ moraxyc ];
mainProgram = "mosdns";
};
}

View File

@ -0,0 +1,37 @@
# Use exportReferencesGraph to capture the possible dependencies of the
# drivers (e.g. libc linked through DT_RUNPATH) and ensure they are mounted
# in the sandbox as well. In practice, things seemed to have worked without
# this as well, but we go with the safe option until we understand why.
{
lib,
runCommand,
python3Packages,
allowedPatterns,
}:
runCommand "allowed-patterns.json"
{
nativeBuildInputs = [ python3Packages.python ];
exportReferencesGraph = builtins.concatMap (
name:
builtins.concatMap (
path:
let
prefix = "${builtins.storeDir}/";
# Has to start with a letter: https://github.com/NixOS/nix/blob/516e7ddc41f39ff939b5d5b5dc71e590f24890d4/src/libstore/build/local-derivation-goal.cc#L568
exportName = ''references-${lib.strings.removePrefix prefix "${path}"}'';
isStorePath = lib.isStorePath path && (lib.hasPrefix prefix "${path}");
in
lib.optionals isStorePath [
exportName
path
]
) allowedPatterns.${name}.paths
) (builtins.attrNames allowedPatterns);
env.storeDir = "${builtins.storeDir}/";
shallowConfig = builtins.toJSON allowedPatterns;
passAsFile = [ "shallowConfig" ];
}
''
python ${./scripts/nix_required_mounts_closure.py}
''

View File

@ -0,0 +1,201 @@
#!/usr/bin/env python3
import glob
import json
import subprocess
import textwrap
from argparse import ArgumentParser
from collections import deque
from itertools import chain
from pathlib import Path
from typing import Deque, Dict, List, Set, Tuple, TypeAlias, TypedDict
import logging
Glob: TypeAlias = str
PathString: TypeAlias = str
class Mount(TypedDict):
host: PathString
guest: PathString
class Pattern(TypedDict):
onFeatures: List[str]
paths: List[Glob | Mount]
unsafeFollowSymlinks: bool
AllowedPatterns: TypeAlias = Dict[str, Pattern]
parser = ArgumentParser("pre-build-hook")
parser.add_argument("derivation_path")
parser.add_argument("sandbox_path", nargs="?")
parser.add_argument("--patterns", type=Path, required=True)
parser.add_argument("--nix-exe", type=Path, required=True)
parser.add_argument(
"--issue-command",
choices=("always", "conditional", "never"),
default="conditional",
help="Whether to print extra-sandbox-paths",
)
parser.add_argument(
"--issue-stop",
choices=("always", "conditional", "never"),
default="conditional",
help="Whether to print the final empty line",
)
parser.add_argument("-v", "--verbose", action="count", default=0)
def symlink_parents(p: Path) -> List[Path]:
out = []
while p.is_symlink() and p not in out:
parent = p.readlink()
if parent.is_relative_to("."):
p = p / parent
else:
p = parent
out.append(p)
return out
def get_strings(drv_env: dict, name: str) -> List[str]:
if "__json" in drv_env:
return list(json.loads(drv_env["__json"]).get(name, []))
else:
return drv_env.get(name, "").split()
def validate_mounts(pattern: Pattern) -> List[Tuple[PathString, PathString, bool]]:
roots = []
for mount in pattern["paths"]:
if isinstance(mount, PathString):
matches = glob.glob(mount)
assert matches, f"Specified host paths do not exist: {mount}"
roots.extend((m, m, pattern["unsafeFollowSymlinks"]) for m in matches)
else:
assert isinstance(mount, dict) and "host" in mount, mount
assert Path(
mount["host"]
).exists(), f"Specified host paths do not exist: {mount['host']}"
roots.append(
(
mount["guest"],
mount["host"],
pattern["unsafeFollowSymlinks"],
)
)
return roots
def entrypoint():
args = parser.parse_args()
VERBOSITY_LEVELS = [logging.ERROR, logging.INFO, logging.DEBUG]
level_index = min(args.verbose, len(VERBOSITY_LEVELS) - 1)
logging.basicConfig(level=VERBOSITY_LEVELS[level_index])
drv_path = args.derivation_path
with open(args.patterns, "r") as f:
allowed_patterns = json.load(f)
if not Path(drv_path).exists():
logging.error(
f"{drv_path} doesn't exist."
" Cf. https://github.com/NixOS/nix/issues/9272"
" Exiting the hook",
)
proc = subprocess.run(
[
args.nix_exe,
"show-derivation",
drv_path,
],
capture_output=True,
)
try:
parsed_drv = json.loads(proc.stdout)
except json.JSONDecodeError:
logging.error(
"Couldn't parse the output of"
"`nix show-derivation`"
f". Expected JSON, observed: {proc.stdout}",
)
logging.error(textwrap.indent(proc.stdout.decode("utf8"), prefix=" " * 4))
logging.info("Exiting the nix-required-binds hook")
return
[canon_drv_path] = parsed_drv.keys()
known_features = set(
chain.from_iterable(
pattern["onFeatures"] for pattern in allowed_patterns.values()
)
)
parsed_drv = parsed_drv[canon_drv_path]
drv_env = parsed_drv.get("env", {})
required_features = get_strings(drv_env, "requiredSystemFeatures")
required_features = list(filter(known_features.__contains__, required_features))
patterns: List[Pattern] = list(
pattern
for pattern in allowed_patterns.values()
for path in pattern["paths"]
if any(feature in required_features for feature in pattern["onFeatures"])
) # noqa: E501
queue: Deque[Tuple[PathString, PathString, bool]] = deque(
(mnt for pattern in patterns for mnt in validate_mounts(pattern))
)
unique_mounts: Set[Tuple[PathString, PathString]] = set()
mounts: List[Tuple[PathString, PathString]] = []
while queue:
guest_path_str, host_path_str, follow_symlinks = queue.popleft()
if (guest_path_str, host_path_str) not in unique_mounts:
mounts.append((guest_path_str, host_path_str))
unique_mounts.add((guest_path_str, host_path_str))
if not follow_symlinks:
continue
host_path = Path(host_path_str)
if not (host_path.is_dir() or host_path.is_symlink()):
continue
# assert host_path_str == guest_path_str, (host_path_str, guest_path_str)
for child in host_path.iterdir() if host_path.is_dir() else [host_path]:
for parent in symlink_parents(child):
parent_str = parent.absolute().as_posix()
queue.append((parent_str, parent_str, follow_symlinks))
# the pre-build-hook command
if args.issue_command == "always" or (
args.issue_command == "conditional" and mounts
):
print("extra-sandbox-paths")
print_paths = True
else:
print_paths = False
# arguments, one per line
for guest_path_str, host_path_str in mounts if print_paths else []:
print(f"{guest_path_str}={host_path_str}")
# terminated by an empty line
something_to_terminate = args.issue_stop == "conditional" and mounts
if args.issue_stop == "always" or something_to_terminate:
print()
if __name__ == "__main__":
entrypoint()

View File

@ -0,0 +1,67 @@
{
addOpenGLRunpath,
allowedPatternsPath ? callPackage ./closure.nix { inherit allowedPatterns; },
allowedPatterns ? rec {
# This config is just an example.
# When the hook observes either of the following requiredSystemFeatures:
nvidia-gpu.onFeatures = [
"gpu"
"nvidia-gpu"
"opengl"
"cuda"
];
# It exposes these paths in the sandbox:
nvidia-gpu.paths = [
addOpenGLRunpath.driverLink
"/dev/dri"
"/dev/nvidia*"
];
nvidia-gpu.unsafeFollowSymlinks = true;
},
callPackage,
extraWrapperArgs ? [ ],
lib,
makeWrapper,
nix,
nixosTests,
python3Packages,
}:
let
attrs = builtins.fromTOML (builtins.readFile ./pyproject.toml);
pname = attrs.project.name;
inherit (attrs.project) version;
in
python3Packages.buildPythonApplication {
inherit pname version;
pyproject = true;
src = lib.cleanSource ./.;
nativeBuildInputs = [
makeWrapper
python3Packages.setuptools
];
postFixup = ''
wrapProgram $out/bin/${pname} \
--add-flags "--patterns ${allowedPatternsPath}" \
--add-flags "--nix-exe ${lib.getExe nix}" \
${builtins.concatStringsSep " " extraWrapperArgs}
'';
passthru = {
inherit allowedPatterns;
tests = {
inherit (nixosTests) nix-required-mounts;
};
};
meta = {
inherit (attrs.project) description;
homepage = attrs.project.urls.Homepage;
license = lib.licenses.mit;
mainProgram = attrs.project.name;
maintainers = with lib.maintainers; [ SomeoneSerge ];
};
}

View File

@ -0,0 +1,20 @@
[build-system]
build-backend = "setuptools.build_meta"
requires = [ "setuptools" ]
[project]
name = "nix-required-mounts"
version = "0.0.1"
description = """
A --pre-build-hook for Nix, \
that allows to expose extra paths in the build sandbox \
based on derivations' requiredSystemFeatrues"""
[project.urls]
Homepage = "https://github.com/NixOS/nixpkgs/tree/master/pkgs/by-name/ni/nix-required-mounts"
[project.scripts]
nix-required-mounts = "nix_required_mounts:entrypoint"
[tool.black]
line-length = 79

View File

@ -0,0 +1,45 @@
import json
import os
store_dir = os.environ["storeDir"]
with open(os.environ["shallowConfigPath"], "r") as f:
config = json.load(f)
cache = {}
def read_edges(path: str | dict) -> list[str | dict]:
if isinstance(path, dict):
return [path]
assert isinstance(path, str)
if not path.startswith(store_dir):
return [path]
if path in cache:
return cache[path]
name = f"references-{path.removeprefix(store_dir)}"
assert os.path.exists(name)
with open(name, "r") as f:
return [p.strip() for p in f.readlines() if p.startswith(store_dir)]
def host_path(mount: str | dict) -> str:
if isinstance(mount, dict):
return mount["host"]
assert isinstance(mount, str), mount
return mount
for pattern in config:
closure = []
for path in config[pattern]["paths"]:
closure.append(path)
closure.extend(read_edges(path))
config[pattern]["paths"] = list({host_path(m): m for m in closure}.values())
with open(os.environ["out"], "w") as f:
json.dump(config, f)

View File

@ -31,13 +31,13 @@
stdenv.mkDerivation rec {
pname = "openvas-scanner";
version = "23.4.1";
version = "23.5.0";
src = fetchFromGitHub {
owner = "greenbone";
repo = "openvas-scanner";
rev = "refs/tags/v${version}";
hash = "sha256-D0HQ00NCep0hAQ+dDWoinIxivloqgjPbp2lUunTxoyM=";
hash = "sha256-bAQFMYHE9nozmfRILFAswN9y0DxnX8LK2E6c3yqzWlA=";
};
nativeBuildInputs = [

View File

@ -0,0 +1,39 @@
{
cmake,
fetchFromGitHub,
gitUpdater,
lib,
ninja,
stdenv,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "pegtl";
version = "3.2.7";
src = fetchFromGitHub {
owner = "taocpp";
repo = "PEGTL";
rev = finalAttrs.version;
hash = "sha256-IV5YNGE4EWVrmg2Sia/rcU8jCuiBynQGJM6n3DCWTQU=";
};
nativeBuildInputs = [
cmake
ninja
];
passthru.updateScript = gitUpdater { };
meta = {
homepage = "https://github.com/taocpp/pegtl";
description = "Parsing Expression Grammar Template Library";
longDescription = ''
Zero-dependency C++ header-only parser combinator library
for creating parsers according to a Parsing Expression Grammar (PEG).
'';
license = lib.licenses.boost;
maintainers = with lib.maintainers; [ vigress8 ];
platforms = lib.platforms.all;
};
})

View File

@ -6,16 +6,16 @@
buildNpmPackage rec {
pname = "pgraphs";
version = "0.6.12";
version = "0.6.13";
src = fetchFromGitHub {
owner = "pg-format";
repo = "pgraphs";
rev = "refs/tags/v${version}";
hash = "sha256-rhNXASSHgdL9knq9uPFhAGlh0ZAKo5TNh/2a4u6Mh1U=";
hash = "sha256-NLQMBEN/wO/xOMy+gX3sQZRqU8gYesXS7hwRGWyjvX0=";
};
npmDepsHash = "sha256-S1pCmRaRuprqIjaylIsuHyguhgQC5vvp7pDq2KJgrHQ=";
npmDepsHash = "sha256-Fj5huWKatJmdH2PUqNWWysE+qhiq7aR2ue723Pv5Y4M=";
dontNpmBuild = true;
meta = {

View File

@ -7,18 +7,18 @@
let
pname = "pinact";
version = "0.2.0";
version = "0.2.1";
src = fetchFromGitHub {
owner = "suzuki-shunsuke";
repo = "pinact";
rev = "v${version}";
hash = "sha256-ndlyfp+neoOEzofIlQEQp/6masnzMQFWAPmhan3hlb0=";
hash = "sha256-HfeHfKXDBHPgxisWSVnrLOQf/4NXtnehkIjQqiCoFIc=";
};
in
buildGoModule {
inherit pname version src;
vendorHash = "sha256-qu4CHh2013q7e7mBuymlKEhjpdtSOaWGVutjegoVP7E=";
vendorHash = "sha256-L9EGygiJ40f7Yw46KdaAof5O/ren6inTK7XerB/uv1g=";
doCheck = true;

View File

@ -8,13 +8,13 @@
buildGoModule rec {
pname = "poutine";
version = "0.12.0";
version = "0.13.0";
src = fetchFromGitHub {
owner = "boostsecurityio";
repo = "poutine";
rev = "refs/tags/v${version}";
hash = "sha256-mB/d3EWBWHx7zrMGRPGOJc2uD3MlhXV8H2WfNiKlzdE=";
hash = "sha256-9vbK2tc57e/YNfhSVbCMxnzOmmahr9T3x5Tt7GQjVnc=";
};
vendorHash = "sha256-HYuyGSatUOch73IKc7/9imhwz0Oz6Mrccs2HKVQtaVE=";

View File

@ -8,13 +8,13 @@
stdenv.mkDerivation rec {
pname = "powerjoular";
version = "0.7.3";
version = "1.0.0";
src = fetchFromGitHub {
owner = "joular";
repo = pname;
rev = version;
hash = "sha256-UjoGY1C58xhINmji7R63wqkWK9yCeXa0wwosnIcfYdA=";
hash = "sha256-3YKoxZTh9ScudAtsE4CJUbcallm7/vvxIdXwaOZt2hA=";
};
nativeBuildInputs = [

View File

@ -0,0 +1,41 @@
{
lib,
python3,
fetchFromGitHub,
imagemagick,
}:
python3.pkgs.buildPythonApplication rec {
pname = "pywal16";
version = "3.5.4";
pyproject = true;
src = fetchFromGitHub {
owner = "eylles";
repo = "pywal16";
rev = "refs/tags/${version}";
hash = "sha256-14xl0E4zpUCjW8rkqWA87TGsDy8lgqOQm9GeE9JIsVk=";
};
nativeBuildInputs = [ python3.pkgs.setuptools ];
nativeCheckInputs = [
python3.pkgs.pytestCheckHook
imagemagick
];
preCheck = ''
export HOME=$(mktemp -d)
'';
pythonImportsCheck = [ "pywal" ];
meta = {
description = "16 colors fork of pywal";
homepage = "https://github.com/eylles/pywal16";
changelog = "https://github.com/eylles/pywal16/blob/${src.rev}/CHANGELOG.md";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ moraxyc ];
mainProgram = "wal";
};
}

View File

@ -19,19 +19,19 @@
stdenv.mkDerivation (finalAttrs: {
pname = "resources";
version = "1.4.0";
version = "1.5.0";
src = fetchFromGitHub {
owner = "nokyan";
repo = "resources";
rev = "refs/tags/v${finalAttrs.version}";
hash = "sha256-Udl5DY68AeysYoXVlQQ0cIv3EHOtdqkW1nmGRYXaT8Y=";
hash = "sha256-Xj8c8ZVhlS2h4ZygeCOaT1XHEbgTSkseinofP9X+5qY=";
};
cargoDeps = rustPlatform.fetchCargoTarball {
inherit (finalAttrs) src;
name = "resources-${finalAttrs.version}";
hash = "sha256-XvCnYBl0pCtJ4vXuQxqBlTVMIiFNQiNabHhqaxq8AdM=";
hash = "sha256-PZ91xSiWt9rMnSy8KZOmWbUL5Y0Nf3Kk577ZwkdnHwg=";
};
nativeBuildInputs = [

View File

@ -0,0 +1,53 @@
{ lib
, buildGoModule
, fetchFromGitHub
, openpam
}:
buildGoModule {
pname = "scion-apps";
version = "unstable-2024-04-05";
src = fetchFromGitHub {
owner = "netsec-ethz";
repo = "scion-apps";
rev = "cb0dc365082788bcc896f0b55c4807b72c2ac338";
hash = "sha256-RzWtnUpZfwryOfumgXHV5QMceLY51Zv3KI0K6WLz8rs=";
};
vendorHash = "sha256-bz4vtELxrDfebk+00w9AcEiK/4skO1mE3lBDU1GkOrk=";
postPatch = ''
substituteInPlace webapp/web/tests/health/scmpcheck.sh \
--replace-fail "hostname -I" "hostname -i"
'';
postInstall = ''
# Add `scion-` prefix to all binaries
for f in $out/bin/*; do
filename="$(basename "$f")"
mv -v $f $out/bin/scion-$filename
done
# Fix nested subpackage names
mv -v $out/bin/scion-server $out/bin/scion-ssh-server
mv -v $out/bin/scion-client $out/bin/scion-ssh-client
# Include static website for webapp
mkdir -p $out/share
cp -r webapp/web $out/share/scion-webapp
'';
buildInputs = [
openpam
];
ldflags = [ "-s" "-w" ];
meta = with lib; {
description = "Public repository for SCION applications";
homepage = "https://github.com/netsec-ethz/scion-apps";
license = licenses.asl20;
maintainers = with maintainers; [ matthewcroughan sarcasticadmin ];
};
}

View File

@ -16,19 +16,19 @@
stdenv.mkDerivation rec {
pname = "televido";
version = "0.3.0";
version = "0.4.0";
src = fetchFromGitHub {
owner = "d-k-bo";
repo = "televido";
rev = "v${version}";
hash = "sha256-qfUwPyutBNEnplD3kmTJXffzcWkEcR6FTLnT5YDSysU=";
hash = "sha256-pMrMXRnfvpDLFkL2IqYJKRao/OF78mXUCBqBgT97+hc=";
};
cargoDeps = rustPlatform.fetchCargoTarball {
inherit src;
name = "${pname}-${version}";
hash = "sha256-CmQQH6a5xMq+v+P4/sbpQ7iDaGKtzV39FgufD5uxz4Y=";
hash = "sha256-wavxkhDS0hspGMw5ZKTxjZ07TiZ67OkbMhicB8h5y64=";
};
nativeBuildInputs = [

View File

@ -7,7 +7,7 @@
}:
let
version = "9.7.1";
version = "9.7.2";
in
rustPlatform.buildRustPackage {
@ -18,10 +18,10 @@ rustPlatform.buildRustPackage {
owner = "erebe";
repo = "wstunnel";
rev = "v${version}";
hash = "sha256-VJllyvTlHlyYhzth6tVzqVe8EPfHdXrcrDmtrS16aMM=";
hash = "sha256-5hpkY8MoSo59KmhXsPuLCmWq4KaUzuHBpesQMtgn7hw=";
};
cargoHash = "sha256-sg/tE8D/cNeMliJr7JIstq36gg/mhYM6n8ye2Y2biq0=";
cargoHash = "sha256-kv+DX98SjI3m2CdM4RHoMMISZyrFmlhlSaBor0dFUSE=";
checkFlags = [
# Tries to launch a test container

View File

@ -0,0 +1,62 @@
{ lib
, stdenvNoCC
, fetchurl
, undmg
, writeShellApplication
, curl
, xmlstarlet
, common-updater-scripts
}:
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "xld";
version = "20240511";
src = fetchurl {
url = "mirror://sourceforge/${finalAttrs.pname}/${finalAttrs.pname}-${finalAttrs.version}.dmg";
hash = "sha256-8xfjAWgtSdbD8gGlkGzT8QRz7egIf4PE/rFsFEDX0+c=";
};
buildInputs = [ undmg ];
sourceRoot = ".";
installPhase = ''
runHook preInstall
mkdir -p "$out/Applications" "$out/bin"
cp -r *.app "$out/Applications"
cp -r CLI/xld "$out/bin"
runHook postInstall
'';
postPatch = ''
substituteInPlace CLI/xld \
--replace "/Applications/XLD.app" "$out/Applications/XLD.app"
'';
passthru.updateScript = lib.getExe (writeShellApplication {
name = "xld-update-script";
runtimeInputs = [
curl
xmlstarlet
common-updater-scripts
];
text = ''
url=$(curl --silent "https://svn.code.sf.net/p/xld/code/appcast/xld-appcast_e.xml")
version=$(echo "$url" | xmlstarlet sel -t -v "substring-before(substring-after(//enclosure/@url, 'version='), '&')")
update-source-version xld "$version" --file=./pkgs/by-name/xl/xld/package.nix
'';
});
meta = {
description = "Lossless audio decoder";
homepage = "https://tmkk.undo.jp/xld/index_e.html";
license = lib.licenses.osl3;
maintainers = with lib.maintainers; [ iivusly ];
platforms = lib.platforms.darwin;
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
mainProgram = "xld";
};
})

File diff suppressed because it is too large Load Diff

View File

@ -2,6 +2,7 @@
lib,
rustPlatform,
fetchFromGitHub,
clang,
copyDesktopItems,
curl,
perl,
@ -24,54 +25,50 @@
darwin,
makeFontsConf,
vulkan-loader,
envsubst,
nix-update-script,
withGLES ? false
withGLES ? false,
}:
assert withGLES -> stdenv.isLinux;
rustPlatform.buildRustPackage rec {
pname = "zed";
version = "0.137.6";
version = "0.141.2";
src = fetchFromGitHub {
owner = "zed-industries";
repo = "zed";
rev = "refs/tags/v${version}";
hash = "sha256-1shK+Q8LTRaIXDqDLdJVsB4sAg2u5Kz0NXKf5jCniOU=";
hash = "sha256-pbflVG4JoXWZEf4Elmd4+RDb9uAaTsj+8lTaBGMaMdo=";
fetchSubmodules = true;
};
cargoLock = {
lockFile = ./Cargo.lock;
outputHashes = {
"alacritty_terminal-0.24.1-dev" = "sha256-aVB1CNOLjNh6AtvdbomODNrk00Md8yz8QzldzvDo1LI=";
"async-pipe-0.1.3" = "sha256-g120X88HGT8P6GNCrzpS5SutALx5H+45Sf4iSSxzctE=";
"blade-graphics-0.4.0" = "sha256-w5BTv/40Zy94dmoZUpVVWrhzR2IaGAIJ0Ftsw1v/R9Y=";
"blade-graphics-0.4.0" = "sha256-khJke3tIO8V7tT3MBk9vQhBKTiJEWTY6Qr4vzeuKnOk=";
"cosmic-text-0.11.2" = "sha256-TLPDnqixuW+aPAhiBhSvuZIa69vgV3xLcw32OlkdCcM=";
"font-kit-0.11.0" = "sha256-+4zMzjFyMS60HfLMEXGfXqKn6P+pOngLA45udV09DM8=";
"heed-0.20.0-alpha.9" = "sha256-8bzoMmfKS+6AmeTzh0/F7WM9OBdIex+NYFER28bpA/s=";
"lsp-types-0.95.1" = "sha256-ZWgQH7sUkP51oni2rqYX8Fsme/bGQV1TL5SbmEAhATU=";
"lsp-types-0.95.1" = "sha256-N4MKoU9j1p/Xeowki/+XiNQPwIcTm9DgmfM/Eieq4js=";
"nvim-rs-0.6.0-pre" = "sha256-bdWWuCsBv01mnPA5e5zRpq48BgOqaqIcAu+b7y1NnM8=";
"pathfinder_simd-0.5.3" = "sha256-bakBcAQZJdHQPXybe0zoMzE49aOHENQY7/ZWZUMt+pM=";
"tree-sitter-0.20.100" = "sha256-xZDWAjNIhWC2n39H7jJdKDgyE/J6+MAVSa8dHtZ6CLE=";
"tree-sitter-bash-0.20.4" = "sha256-VP7rJfE/k8KV1XN1w5f0YKjCnDMYU1go/up0zj1mabM=";
"tree-sitter-cpp-0.20.0" = "sha256-2QYEFkpwcRmh2kf4qEAL2a5lGSa316CetOhF73e7rEM=";
"tree-sitter-css-0.19.0" = "sha256-5Qti/bFac2A1PJxqZEOuSLK3GGKYwPDKAp3OOassBxU=";
"tree-sitter-elixir-0.1.0" = "sha256-hBHqQ3eBjknRPJjP+lQJU6NPFhUMtiv4FbKsTw28Bog=";
"tree-sitter-go-0.20.0" = "sha256-/mE21JSa3LWEiOgYPJcq0FYzTbBuNwp9JdZTZqmDIUU=";
"tree-sitter-gomod-1.0.2" = "sha256-OPtqXe6OMC9c5dgFH8Msj+6DU01LvLKVbCzGLj0PnLI=";
"tree-sitter-gowork-0.0.1" = "sha256-lM4L4Ap/c8uCr4xUw9+l/vaGb3FxxnuZI0+xKYFDPVg=";
"tree-sitter-heex-0.0.1" = "sha256-6LREyZhdTDt3YHVRPDyqCaDXqcsPlHOoMFDb2B3+3xM=";
"tree-sitter-jsdoc-0.20.0" = "sha256-fKscFhgZ/BQnYnE5EwurFZgiE//O0WagRIHVtDyes/Y=";
"tree-sitter-json-0.20.0" = "sha256-fZNftzNavJQPQE4S1VLhRyGQRoJgbWA5xTPa8ZI5UX4=";
"tree-sitter-markdown-0.0.1" = "sha256-F8VVd7yYa4nCrj/HEC13BTC7lkV3XSb2Z3BNi/VfSbs=";
"tree-sitter-proto-0.0.2" = "sha256-W0diP2ByAXYrc7Mu/sbqST6lgVIyHeSBmH7/y/X3NhU=";
"tree-sitter-typescript-0.20.2" = "sha256-cpOAtfvlffS57BrXaoa2xa9NUYw0AsHxVI8PrcpgZCQ=";
"tree-sitter-yaml-0.0.1" = "sha256-S59jLlipBI2kwFuZDMmpv0TOZpGyXpbAizN3yC6wJ5I=";
"xim-0.4.0" = "sha256-vxu3tjkzGeoRUj7vyP0vDGI7fweX8Drgy9hwOUOEQIA=";
};
};
nativeBuildInputs = [
clang
copyDesktopItems
curl
perl
@ -142,12 +139,27 @@ rustPlatform.buildRustPackage rec {
];
postInstall = ''
mv $out/bin/Zed $out/bin/zed
install -D ${src}/crates/zed/resources/app-icon@2x.png $out/share/icons/hicolor/1024x1024@2x/apps/zed.png
install -D ${src}/crates/zed/resources/app-icon.png $out/share/icons/hicolor/512x512/apps/zed.png
install -D ${src}/crates/zed/resources/zed.desktop $out/share/applications/dev.zed.Zed.desktop
# extracted from https://github.com/zed-industries/zed/blob/v0.141.2/script/bundle-linux
(
export DO_STARTUP_NOTIFY="true"
export APP_CLI="zed"
export APP_ICON="zed"
export APP_NAME="Zed"
mkdir -p "$out/share/applications"
${lib.getExe envsubst} < "crates/zed/resources/zed.desktop.in" > "$out/share/applications/zed.desktop"
)
'';
passthru.updateScript = nix-update-script {
extraArgs = [
"--version-regex"
"v(.*)"
];
};
meta = with lib; {
description = "High-performance, multiplayer code editor from the creators of Atom and Tree-sitter";
homepage = "https://zed.dev";

View File

@ -6,13 +6,13 @@
stdenv.mkDerivation (finalAttrs: {
pname = "zpaqfranz";
version = "59.8";
version = "59.9";
src = fetchFromGitHub {
owner = "fcorbelli";
repo = "zpaqfranz";
rev = finalAttrs.version;
hash = "sha256-N3R/M0TS8XzRilQT4NFqIlfo2NqfunA38IrQBz5uaPg=";
hash = "sha256-1TmJHksFeiDjkIslA9FAZrWElgfCV1HOtS7H2pq8sHY=";
};
nativeBuildInputs = [

View File

@ -9,7 +9,6 @@
, dde-polkit-agent
, qt5integration
, libsecret
, libgnome-keyring
}:
stdenv.mkDerivation rec {
@ -39,7 +38,6 @@ stdenv.mkDerivation rec {
dtkwidget
dde-polkit-agent
qt5integration
libgnome-keyring
libsecret
];

View File

@ -11,6 +11,7 @@
"pidgin@muffinmad" = callPackage ./pidgin-im-integration { };
"pop-shell@system76.com" = callPackage ./pop-shell { };
"sound-output-device-chooser@kgshank.net" = callPackage ./sound-output-device-chooser { };
"systemd-manager@hardpixel.eu" = callPackage ./systemd-manager { };
"taskwhisperer-extension@infinicode.de" = callPackage ./taskwhisperer { };
"tilingnome@rliang.github.com" = callPackage ./tilingnome { };
"TopIcons@phocean.net" = callPackage ./topicons-plus { };

View File

@ -0,0 +1,68 @@
{
lib,
stdenvNoCC,
fetchFromGitHub,
glib,
# These loosen security a bit, so we don't install them by default. See also:
# https://github.com/hardpixel/systemd-manager?tab=readme-ov-file#without-password-prompt
allowPolkitPolicy ? "none",
config,
systemd ? config.systemd.package,
}:
assert lib.elem allowPolkitPolicy [
"none"
"pkexec"
"systemctl"
];
stdenvNoCC.mkDerivation rec {
pname = "gnome-shell-extension-systemd-manager";
version = "16";
# Upstream doesn't post new versions in extensions.gnome.org anymore, see also:
# https://github.com/hardpixel/systemd-manager/issues/19
src = fetchFromGitHub {
owner = "hardpixel";
repo = "systemd-manager";
rev = "v${version}";
hash = "sha256-JecSIRj582jJWdrCQYBWFRkIhosxRhD3BxSAy8/0nVw=";
};
nativeBuildInputs = [ glib ];
postInstall =
''
rm systemd-manager@hardpixel.eu/schemas/gschemas.compiled
glib-compile-schemas systemd-manager@hardpixel.eu/schemas
mkdir -p $out/share/gnome-shell/extensions
mv systemd-manager@hardpixel.eu $out/share/gnome-shell/extensions
''
+ lib.optionalString (allowPolkitPolicy == "pkexec") ''
local bn=org.freedesktop.policykit.pkexec.systemctl.policy
mkdir -p $out/share/polkit-1/actions
substitute systemd-policies/$bn $out/share/polkit-1/actions/$bn \
--replace-fail /usr/bin/systemctl ${lib.getBin systemd}/bin/systemctl
''
+ lib.optionalString (allowPolkitPolicy == "systemctl") ''
install -Dm0644 \
systemd-policies/10-service_status.rules \
$out/share/polkit-1/rules.d/10-gnome-extension-systemd-manager.rules
'';
passthru = {
extensionUuid = "systemd-manager@hardpixel.eu";
extensionPortalSlug = "systemd-manager";
};
meta = with lib; {
description = "GNOME Shell extension to manage systemd services";
homepage = "https://github.com/hardpixel/systemd-manager";
license = licenses.gpl3Only;
maintainers = with maintainers; [
linsui
doronbehar
];
};
}

View File

@ -2,9 +2,9 @@
[7off]
dependencies = ["anaphora", "define-options", "lowdown", "matchable", "srfi-1", "sxml-transforms", "sxpath", "utf8", "srfi-42", "srfi-69", "strse", "uri-common"]
license = "agpl"
sha256 = "0hsqxva92k3yasrlgl7bbq3z3d2d2nd3r3i2v6vimv7mp2chfkdr"
sha256 = "06nzh23bpf9f011wr5sxqnq4nb1b7af6148qz52ri9hbb8r2mi4i"
synopsis = "Markdown to Gemini text"
version = "1.31"
version = "1.32"
[F-operator]
dependencies = ["miscmacros", "datatype", "box"]
@ -79,9 +79,9 @@ version = "3.0.0"
[amb]
dependencies = ["srfi-1"]
license = "bsd"
sha256 = "0ggwmsd4igg099ikn5qja5nkqmrnsw0byyk3q9y04ygvzalqyb36"
sha256 = "0n2wbxb23fai27hgk86jf9lnnrg0dvh989ysjkscdf9my96j448s"
synopsis = "The non-deterministic backtracking ambivalence operator"
version = "3.0.9"
version = "3.0.10"
[amqp]
dependencies = ["bitstring", "mailbox", "srfi-18", "uri-generic"]
@ -105,18 +105,18 @@ synopsis = "Procedures to generate ANSI escape sequences"
version = "0.6"
[apropos]
dependencies = ["srfi-1", "utf8", "string-utils", "symbol-utils", "check-errors"]
dependencies = ["utf8", "srfi-1", "symbol-utils", "check-errors"]
license = "bsd"
sha256 = "01zdifhqc0jfm810106sh87w0fmpchf4dph0k8v1lyjzbj1ivmi4"
sha256 = "01h8fpz32bc3c9ldyamawvj7jf2b4b10zz08a22i90ww5lyvn90s"
synopsis = "CHICKEN apropos"
version = "3.8.3"
version = "3.10.2"
[arcadedb]
dependencies = ["uri-common", "medea"]
dependencies = ["medea"]
license = "zlib-acknowledgement"
sha256 = "1w2iqylz0wfn7is8vss5dkwmi3pxhbh2h7ywzg39x45z2c91sd28"
sha256 = "1lhagnaxwvzax82k7qg8v5w7wj9mqi4y686j52fqiqnry99h73k0"
synopsis = "An ArcadeDB database driver for CHICKEN Scheme."
version = "0.7"
version = "0.8"
[args]
dependencies = ["srfi-1", "srfi-13", "srfi-37"]
@ -289,9 +289,9 @@ version = "1.37"
[bitwise-utils]
dependencies = []
license = "public-domain"
sha256 = "065q6ha8wsj6qhg7zxkaj2qrj5sm3iz2v7shcp5wh7j3fqwbs5q5"
sha256 = "1p433kx2q1zam5a2isgnxiywgkcb77bmbqlajpr7rvm5i739h8g7"
synopsis = "Bitwise utilities"
version = "1.3.0"
version = "1.3.1"
[blas]
dependencies = ["bind", "compile-file", "srfi-13"]
@ -352,16 +352,16 @@ version = "0.11"
[brev-separate]
dependencies = ["matchable", "miscmacros", "srfi-1", "srfi-69"]
license = "bsd-1-clause"
sha256 = "0ycm95vcf1dj6m3kqii7b2a5kxyd1m6lzksz77ispay14srgw8rd"
sha256 = "1wzcqbccngcajzw4js7llys1pnmnvsmkk01v1ji6khy4kyghvspl"
synopsis = "Hodge podge of macros and combinators"
version = "1.95"
version = "1.97"
[brev]
dependencies = ["anaphora", "brev-separate", "clojurian", "combinators", "define-options", "dwim-sort", "fix-me-now", "acetone", "html-parser", "match-generics", "http-client", "matchable", "miscmacros", "scsh-process", "sequences", "srfi-1", "srfi-42", "srfi-69", "strse", "sxml-serializer", "sxml-transforms", "sxpath", "tree", "uri-common"]
license = "public-domain"
sha256 = "1kbphbz21rlrsfcfqg77hm1vv7wh9z1gcwh5lb2hlrqp2yl7m7yc"
sha256 = "0gzbhyv228a76cnnisn7cqyhjsrphxn0bavxisg9rd40ndggijka"
synopsis = "A huge pile of batteries and shortcuts"
version = "1.41"
version = "1.42"
[byte-blob]
dependencies = ["srfi-1"]
@ -422,9 +422,9 @@ version = "0.4"
[check-errors]
dependencies = []
license = "bsd"
sha256 = "09ffyffrv3gamjsjgbisn3yxb40wbqy5pfrs6dxw20n1ffimgfw5"
sha256 = "1xgchkpcmk7cwvbr87xmmwnw7z9ah8r8p6hv7kdkpjy66bas0yhj"
synopsis = "Argument checks & errors"
version = "3.8.0"
version = "3.8.2"
[checks]
dependencies = ["simple-exceptions"]
@ -499,9 +499,9 @@ version = "5.0.3"
[ck-macros]
dependencies = []
license = "public-domain"
sha256 = "1x2d1f0fnzz5h871qgw4hkdffhd7rv7w59lq7r1y0r0jzl2rv83j"
sha256 = "1xry5blp0vjmxidp47f9i8axji2q5f7csjkqi0n1gdwkm54755jz"
synopsis = "Composable macros based on the CK abstract machine"
version = "0.3.0"
version = "0.3.1"
[clojurian]
dependencies = ["srfi-18"]
@ -735,11 +735,11 @@ synopsis = "Directed graph in adjacency list format."
version = "2.0"
[directory-utils]
dependencies = ["srfi-1", "srfi-13", "miscmacros", "moremacros", "list-utils", "stack", "check-errors"]
dependencies = ["srfi-1", "utf8", "miscmacros", "moremacros", "stack", "list-utils", "check-errors"]
license = "bsd"
sha256 = "0jaj7pi27d65wz1zpfxiphkdnk4an5yahhhxs28svsqprq0v0ay1"
sha256 = "0xiga98dddi5vg5h1m2vws5prk4ri96rx6l359lji62aq51h526i"
synopsis = "directory-utils"
version = "2.2.6"
version = "2.3.0"
[disjoint-set]
dependencies = []
@ -1078,11 +1078,11 @@ synopsis = "Chicken bindings to genann - a simple neural network library in ANSI
version = "0.2.2"
[generalized-arrays]
dependencies = ["check-errors", "matchable", "srfi-133", "typed-records"]
license = "bsd3"
sha256 = "0d9n1njd1mrcpqz8xim0m5x0yz94b8xyvwzyvsfq4l7q3km44v3k"
synopsis = "An implementation providing generalized arrays and storage classes for CHICKEN Scheme."
version = "0.0.7"
dependencies = ["r7rs", "srfi-48", "srfi-128", "srfi-133", "srfi-160", "check-errors", "transducers"]
license = "bsd-3"
sha256 = "1ypga6lanhqsm8lpgk6s1nj4q024xb9kl9ar58cwj53h1irn7942"
synopsis = "Provides generalized arrays, intervals, and storage classes for CHICKEN Scheme."
version = "2.0.0"
[generics]
dependencies = ["simple-cells"]
@ -1108,9 +1108,9 @@ version = "1.21"
[getopt-utils]
dependencies = ["utf8", "srfi-1", "getopt-long"]
license = "bsd"
sha256 = "0i17fj29zbbm05x68h7fy524ypk8vbr62gq6jkrwf18371l0l767"
sha256 = "1992zcps7gghhc9l7sfkglmf2rqgwvw6jz39k7q9mbs690chq1l1"
synopsis = "Utilities for getopt-long"
version = "1.1.1"
version = "1.2.0"
[git]
dependencies = ["srfi-69", "foreigners", "module-declarations", "srfi-1"]
@ -1409,9 +1409,9 @@ version = "0.4"
[ipfs]
dependencies = ["http-client", "intarweb", "medea", "srfi-1", "srfi-13", "srfi-189", "srfi-197", "uri-common"]
license = "unlicense"
sha256 = "1mw6z3piddy9xz494kv0243jhhirlb1dp15dph2p1ks4bhipbr4m"
sha256 = "1ghsqdnw73xz9pbl6d7j38qgs066wsy1y6q9l0ardbqkmkibwyr8"
synopsis = "IPFS HTTP API for Scheme"
version = "0.0.13"
version = "0.0.15"
[irc]
dependencies = ["matchable", "regex", "srfi-1"]
@ -1542,9 +1542,9 @@ version = "1.2"
[levenshtein]
dependencies = ["srfi-1", "srfi-13", "srfi-63", "srfi-69", "vector-lib", "utf8", "miscmacros", "record-variants", "check-errors"]
license = "bsd"
sha256 = "07jwz006c6yhibg7d9nb35rif04810820pss5mg7c7mbn2nzmq1q"
sha256 = "1q09kml6igd010j630m52rg7vayfsab176k3vjcsjn7ccf3i7a31"
synopsis = "Levenshtein edit distance"
version = "2.4.0"
version = "2.4.1"
[lexgen]
dependencies = ["srfi-1", "utf8", "srfi-127"]
@ -1703,9 +1703,16 @@ version = "2.8"
[matchable]
dependencies = []
license = "public-domain"
sha256 = "0bizkac4a926lbk0v2m05ysq359mzhfsqh973m72jc4gcj4azr5p"
sha256 = "1c7c61wivhn8qrj5rfivr2f0ffjgl4ccd6chk9p705rynjiv7pw0"
synopsis = "Hygienic MATCH replacement"
version = "1.1"
version = "1.2"
[math-utils]
dependencies = []
license = "public-domain"
sha256 = "1jcr67q4pq7i34lkhbqml18rkv6w61wsqclp9k1xgvg6p2b0aaxj"
synopsis = "Miscellaneous math utilities"
version = "1.0.6"
[math]
dependencies = ["srfi-1", "r6rs-bytevectors", "miscmacros", "srfi-133", "srfi-42"]
@ -1717,9 +1724,9 @@ version = "0.3.4"
[mathh]
dependencies = []
license = "public-domain"
sha256 = "1zdm58a950vslyjkw4w04c70vhjwf5bdxw79mp3cq65ik474gi8d"
synopsis = "ISO C math functions, miscellaneous math utilities, and constants"
version = "4.6.4"
sha256 = "1mf9aqjwp068a93fmkm29f5mawc15nizm8wwvfra1af7y4f434al"
synopsis = "ISO C math functions and constants"
version = "4.7.0"
[matrico]
dependencies = []
@ -1780,9 +1787,9 @@ version = "4.3.8"
[message-digest-type]
dependencies = ["blob-utils", "string-utils", "message-digest-primitive", "check-errors"]
license = "bsd"
sha256 = "0njvcflhafs5pqvhnm31alp66v1szg2y08fdlwnwq2bzzpaq83id"
sha256 = "15cp3km0lv4s28yq0ynabqmd902325692xyq2hmsv0n68j5jckdz"
synopsis = "Message Digest Type"
version = "4.3.5"
version = "4.3.6"
[message-digest-utils]
dependencies = ["blob-utils", "string-utils", "memory-mapped-files", "message-digest-primitive", "message-digest-type", "check-errors"]
@ -1878,16 +1885,16 @@ version = "4.0.1"
[moremacros]
dependencies = ["srfi-69", "miscmacros", "check-errors"]
license = "bsd"
sha256 = "09kc4wmhwkdhspk8g0i357qdq9mp1xcalgnqi8z9yasfy2k6gk1h"
sha256 = "0xwrsak9r77gyq85jhqj1hwjpmv897d8mgzqhw1q7br2clry44sk"
synopsis = "More miscellaneous macros"
version = "2.5.0"
version = "2.5.3"
[mosquitto]
dependencies = ["srfi-1"]
license = "mit"
sha256 = "0v03hljm71hl6xr1pffzcpk2izil9w2sp9k68a7iirvpcvqg9iph"
sha256 = "1pdhks3wii43l5wbmqich93zk6vy0b62h8qhv1k2wd8llv33gx6r"
synopsis = "Bindings to mosquitto MQTT client library"
version = "0.1.3"
version = "0.1.4"
[mpd-client]
dependencies = ["regex", "srfi-1"]
@ -1969,9 +1976,9 @@ version = "5.0.8"
[number-limits]
dependencies = []
license = "bsd"
sha256 = "02nz5sicimp6bmka9lcbafpf7v8xxp3sml47s85wccmr0rky575q"
sha256 = "134958zarw74yrxn97sixmm987b047p7izppc0cxx9rlviq145hd"
synopsis = "Limit constants for numbers"
version = "3.0.3"
version = "3.0.8"
[oauth]
dependencies = ["srfi-1", "srfi-13", "uri-common", "intarweb", "http-client", "hmac", "sha1", "base64"]
@ -2148,6 +2155,13 @@ sha256 = "06sqn5gz5n2zfdk5z2c20mz4r6w9mslxvlanvmq1wdzr5qnvkh9s"
synopsis = "Bindings for PostgreSQL's C-api"
version = "4.1.4"
[prefixes]
dependencies = ["tree-walkers"]
license = "bsd"
sha256 = "09xy34vz2w9ngi9z2yahv3fw5xiiy4xpdmf33zfvj46k7w5dahpn"
synopsis = "prefixing in er-macro-transformers made easy"
version = "1.0"
[premodules]
dependencies = ["simple-tests"]
license = "bsd"
@ -2200,9 +2214,9 @@ version = "3.0"
[pstk]
dependencies = ["srfi-1", "srfi-13"]
license = "bsd"
sha256 = "11z0ssdrpyal1px6x5qwxyabxs4y2q7glbz7mnwq0i01imwv1c2v"
sha256 = "075w2kaljy08cx8z78pi3741is1fi63bfsfdy229gkfrbkzl8vpz"
synopsis = "PS/Tk: Portable Scheme interface to Tk"
version = "1.4.0"
version = "1.4.1"
[pthreads]
dependencies = ["srfi-18"]
@ -2319,9 +2333,9 @@ version = "1.4"
[redis]
dependencies = ["r7rs", "srfi-34", "srfi-35", "srfi-69", "srfi-99", "srfi-113", "srfi-128", "srfi-133", "srfi-152", "srfi-158"]
license = "bsd"
sha256 = "1z8pr6dgz652h14zn1vkdm3av48lifk4vf7jzacrq0f0k14i5bc2"
sha256 = "1p3q9216y0ddnghcy83h3xm0vi2qg17kv1v1xff2sfz4mzliy6qf"
synopsis = "A Redis client library for Chicken Scheme"
version = "0.5"
version = "0.6"
[regex-case]
dependencies = ["regex"]
@ -2466,9 +2480,9 @@ version = "0.3.2"
[scheme-indent]
dependencies = ["srfi-1"]
license = "bsd"
sha256 = "0brwmphr724shd32dcixsn9wz9zqrhg27g7rjbiz96885maj6nwf"
sha256 = "1jjgi0wwfk3bx8ayc09y09pxg9awdx5hm397gqhg6gvjbn3sm3in"
synopsis = "A Scheme code indenter"
version = "0.5"
version = "0.6"
[scheme2c-compatibility]
dependencies = ["srfi-1", "srfi-13", "srfi-14", "traversal", "foreigners", "xlib"]
@ -2536,9 +2550,9 @@ version = "0.4.1"
[semantic-version]
dependencies = ["utf8", "srfi-1", "vector-lib", "srfi-69", "srfi-128", "record-variants"]
license = "bsd"
sha256 = "02y7d0lpkrn77ypk2dx8nm70lpbszz5w2cy177s4gvy88dx5qgmq"
sha256 = "10wczj83664q09zxgcnf1zr96xds6dmfvn0gvw8cq4i269ppcv0j"
synopsis = "Semantic Version Utilities"
version = "0.0.13"
version = "0.0.16"
[sendfile]
dependencies = ["memory-mapped-files"]
@ -2610,6 +2624,13 @@ sha256 = "0ck8mgs2alvsial3ay9638ia2kl4zs63x6rc480p24sxhil6klg8"
synopsis = "An efficient and powerful lexer generator"
version = "1.0"
[simple-binds]
dependencies = []
license = "bsd"
sha256 = "0b5frz0zq5b87l4l5hhca318m0mjllw9zjacbyw0l2w39l48f77z"
synopsis = "Some simple destructuring bind macros"
version = "1.1"
[simple-cells]
dependencies = ["checks"]
license = "bsd"
@ -3124,9 +3145,9 @@ version = "1.0.3"
[srfi-19]
dependencies = ["srfi-1", "utf8", "srfi-18", "srfi-29", "miscmacros", "locale", "record-variants", "check-errors"]
license = "bsd"
sha256 = "1m2pyp5mv09inli9jq7fm9q55nhg2xwp50f7s6cgndpp2w2kb38v"
sha256 = "0vqwg2sknm7fm677npbjdvhcfa2s6l41sgvhkk11m10b8jgnr1b3"
synopsis = "Time Data Types and Procedures"
version = "4.9.5"
version = "4.9.6"
[srfi-193]
dependencies = []
@ -3215,9 +3236,9 @@ version = "4.2.3"
[srfi-29]
dependencies = ["srfi-1", "srfi-69", "utf8", "locale", "posix-utils", "condition-utils", "check-errors"]
license = "bsd"
sha256 = "1pz31xrfja4y43ci5n8gplhdnasbyxx0kwlmcjzycs1js4b66ld1"
sha256 = "1jyjwkz6jz9da3n32cgja2dvwrsl9lckknxjb1ial0359ibqnc3h"
synopsis = "Localization"
version = "3.0.8"
version = "3.0.11"
[srfi-34]
dependencies = []
@ -3467,9 +3488,9 @@ version = "1.1"
[string-utils]
dependencies = ["utf8", "srfi-1", "srfi-13", "srfi-69", "miscmacros", "check-errors"]
license = "bsd"
sha256 = "0f9m63flywcx7b6rhb7d562v26xilnxl0zcd8c6c4rfjsr0bdgjr"
sha256 = "1ilzdvbmmm7jnq4m3nrbxhj9x2b4d772748m9fjxzl9bqqik1a54"
synopsis = "String Utilities"
version = "2.7.3"
version = "2.7.4"
[strse]
dependencies = ["matchable", "srfi-13", "miscmacros"]
@ -3551,9 +3572,9 @@ version = "1.0"
[symbol-utils]
dependencies = ["utf8"]
license = "bsd"
sha256 = "0mxcdlf1i0xn70h9l5grgx1yvkbgq9rcvil02gdp9by5qqcqmklh"
sha256 = "1514yvgpknkiwjksnkcshqxz6c7sb5ab182lfwrrha3ch2islq3h"
synopsis = "Symbol Utilities"
version = "2.5.0"
version = "2.6.0"
[synch]
dependencies = ["srfi-18", "check-errors"]
@ -3691,9 +3712,9 @@ version = "0.1.0"
[toml]
dependencies = ["r7rs", "rfc3339", "coops"]
license = "mit"
sha256 = "10isk4rxcjabm16g59nxafm2vx0vidjq1alaxbih3gw9w2kc11l4"
sha256 = "0235ihy5y34m5nw1n75y84hs9icjls77w99c000ysm6ahlhqmq0x"
synopsis = "A Chicken binding to read TOML configuration files"
version = "0.7"
version = "0.8"
[topham]
dependencies = ["http-client", "intarweb", "medea", "openssl", "optimism", "simple-exceptions", "srfi-1", "module-declarations"]
@ -3733,9 +3754,9 @@ version = "1.7"
[tree-walkers]
dependencies = []
license = "bsd"
sha256 = "1if8njjaac4i23126jlmzw67y7hcr2hs842nwsgyzi2hi780pzvk"
synopsis = "replacement of car, cdr and consorts"
version = "1.0"
sha256 = "0zsgrw8sxg3fc8z42ghjh47jq2ycwsmsgdw3kn7fbhvypz4yrmfy"
synopsis = "replacement of car, cdr and consorts and other tree- and\nlist-routines"
version = "2.0"
[tree]
dependencies = ["srfi-1", "srfi-42", "srfi-69", "srfi-71"]
@ -3978,9 +3999,9 @@ version = "0.2"
[zshbrev]
dependencies = ["brev"]
license = "lgplv3"
sha256 = "1zmb84z22p8gv1bk05x7daqpl5h1z71hpivkyc1wbjfxyymmyaxj"
sha256 = "12angz4d31vir1ss80d2ghbh0bdqnbijn44j8hrnb31ikm7xg35z"
synopsis = "Access Chicken functions from any shell and access zsh functions from Chicken"
version = "1.21"
version = "1.22"
[zstd]
dependencies = []

View File

@ -0,0 +1,19 @@
{ lib, mkCoqDerivation, coq, coq-hammer-tactics, version ? null }:
mkCoqDerivation {
inherit version;
pname = "coq-hammer";
inherit (coq-hammer-tactics) owner repo defaultVersion release releaseRev;
buildFlags = [ "plugin" ];
installTargets = [ "install-plugin" ];
extraInstallFlags = [ "BINDIR=$(out)/bin/" ];
mlPlugin = true;
propagatedBuildInputs = [ coq.ocamlPackages.findlib coq-hammer-tactics ];
meta = coq-hammer-tactics.meta // {
description = "General-purpose automated reasoning hammer tool for Coq";
};
}

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