···33## How to use Agda
4455Agda can be installed from `agda`:
66-```
66+```ShellSession
77$ nix-env -iA agda
88```
99···15151616For example, suppose we wanted a version of Agda which has access to the standard library. This can be obtained with the expressions:
17171818-```
1818+```nix
1919agda.withPackages [ agdaPackages.standard-library ]
2020```
21212222or
23232424-```
2424+```nix
2525agda.withPackages (p: [ p.standard-library ])
2626```
2727···3232Agda will not by default use these libraries. To tell Agda to use the library we have some options:
33333434* Call `agda` with the library flag:
3535-```
3535+```ShellSession
3636$ agda -l standard-library -i . MyFile.agda
3737```
3838* Write a `my-library.agda-lib` file for the project you are working on which may look like:
···4949Agda modules can be compiled with the `--compile` flag. A version of `ghc` with `ieee754` is made available to the Agda program via the `--with-compiler` flag.
5050This can be overridden by a different version of `ghc` as follows:
51515252-```
5252+```nix
5353agda.withPackages {
5454 pkgs = [ ... ];
5555 ghc = haskell.compiler.ghcHEAD;
···8080## Adding Agda packages to Nixpkgs
81818282To add an Agda package to `nixpkgs`, the derivation should be written to `pkgs/development/libraries/agda/${library-name}/` and an entry should be added to `pkgs/top-level/agda-packages.nix`. Here it is called in a scope with access to all other Agda libraries, so the top line of the `default.nix` can look like:
8383-```
8383+```nix
8484{ mkDerivation, standard-library, fetchFromGitHub }:
8585```
8686and `mkDerivation` should be called instead of `agdaPackages.mkDerivation`. Here is an example skeleton derivation for iowa-stdlib:
87878888-```
8888+```nix
8989mkDerivation {
9090 version = "1.5.0";
9191 pname = "iowa-stdlib";
+3-3
doc/languages-frameworks/dotnet.section.md
···4455For local development, it's recommended to use nix-shell to create a dotnet environment:
6677-```
77+```nix
88# shell.nix
99with import <nixpkgs> {};
1010···20202121It's very likely that more than one sdk will be needed on a given project. Dotnet provides several different frameworks (E.g dotnetcore, aspnetcore, etc.) as well as many versions for a given framework. Normally, dotnet is able to fetch a framework and install it relative to the executable. However, this would mean writing to the nix store in nixpkgs, which is read-only. To support the many-sdk use case, one can compose an environment using `dotnetCorePackages.combinePackages`:
22222323-```
2323+```nix
2424with import <nixpkgs> {};
25252626mkShell {
···37373838This will produce a dotnet installation that has the dotnet 3.1, 3.0, and 2.1 sdk. The first sdk listed will have it's cli utility present in the resulting environment. Example info output:
39394040-```
4040+```ShellSesssion
4141$ dotnet --info
4242.NET Core SDK (reflecting any global.json):
4343 Version: 3.1.101
+9-9
doc/languages-frameworks/idris.section.md
···4455The easiest way to get a working idris version is to install the `idris` attribute:
6677-```
77+```ShellSesssion
88$ # On NixOS
99$ nix-env -i nixos.idris
1010$ # On non-NixOS
···21212222And then:
23232424-```
2424+```ShellSesssion
2525$ # On NixOS
2626$ nix-env -iA nixos.myIdris
2727$ # On non-NixOS
···2929```
30303131To see all available Idris packages:
3232-```
3232+```ShellSesssion
3333$ # On NixOS
3434$ nix-env -qaPA nixos.idrisPackages
3535$ # On non-NixOS
···3737```
38383939Similarly, entering a `nix-shell`:
4040-```
4040+```ShellSesssion
4141$ nix-shell -p 'idrisPackages.with-packages (with idrisPackages; [ contrib pruviloj ])'
4242```
4343···45454646To have access to these libraries in idris, call it with an argument `-p <library name>` for each library:
47474848-```
4848+```ShellSesssion
4949$ nix-shell -p 'idrisPackages.with-packages (with idrisPackages; [ contrib pruviloj ])'
5050[nix-shell:~]$ idris -p contrib -p pruviloj
5151```
52525353A listing of all available packages the Idris binary has access to is available via `--listlibs`:
54545555-```
5555+```ShellSesssion
5656$ idris --listlibs
575700prelude-idx.ibc
5858pruviloj
···105105106106Assuming this file is saved as `yaml.nix`, it's buildable using
107107108108-```
108108+```ShellSesssion
109109$ nix-build -E '(import <nixpkgs> {}).idrisPackages.callPackage ./yaml.nix {}'
110110```
111111···121121122122in another file (say `default.nix`) to be able to build it with
123123124124-```
124124+```ShellSesssion
125125$ nix-build -A yaml
126126```
127127···133133134134For example you could set
135135136136-```
136136+```nix
137137build-idris-package {
138138 idrisBuildOptions = [ "--log" "1" "--verbose" ]
139139
+4-4
doc/languages-frameworks/python.section.md
···7979By default `nix-shell` will start a `bash` session with this interpreter in our
8080`PATH`, so if we then run:
81818282-```
8282+```Python console
8383[nix-shell:~/src/nixpkgs]$ python3
8484Python 3.8.1 (default, Dec 18 2019, 19:06:26)
8585[GCC 9.2.0] on linux
···9090Note that no other modules are in scope, even if they were imperatively
9191installed into our user environment as a dependency of a Python application:
92929393-```
9393+```Python console
9494>>> import requests
9595Traceback (most recent call last):
9696 File "<stdin>", line 1, in <module>
···146146Executing this script requires a `python3` that has `numpy`. Using what we learned
147147in the previous section, we could startup a shell and just run it like so:
148148149149-```
150150-nix-shell -p 'python38.withPackages(ps: with ps; [ numpy ])' --run 'python3 foo.py'
149149+```ShellSesssion
150150+$ nix-shell -p 'python38.withPackages(ps: with ps; [ numpy ])' --run 'python3 foo.py'
151151The dot product of [1 2] and [3 4] is: 11
152152```
153153
+3-3
doc/languages-frameworks/qt.section.md
···103103### Example adding a Qt library {#qt-library-all-packages-nix}
104104105105The following represents the contents of `qt5-packages.nix`.
106106-```
106106+```nix
107107{
108108 # ...
109109···133133### Example adding a Qt application {#qt-application-all-packages-nix}
134134135135The following represents the contents of `qt5-packages.nix`.
136136-```
136136+```nix
137137{
138138 # ...
139139···144144```
145145146146The following represents the contents of `all-packages.nix`.
147147-```
147147+```nix
148148{
149149 # ...
150150
+27-26
doc/languages-frameworks/rust.section.md
···2233To install the rust compiler and cargo put
4455-```
66-rustc
77-cargo
55+```nix
66+environment.systemPackages = [
77+ rustc
88+ cargo
99+];
810```
9111010-into the `environment.systemPackages` or bring them into
1111-scope with `nix-shell -p rustc cargo`.
1212+into your `configuration.nix` or bring them into scope with `nix-shell -p rustc cargo`.
12131314For other versions such as daily builds (beta and nightly),
1415use either `rustup` from nixpkgs (which will manage the rust installation in your home directory),
···18191920Rust applications are packaged by using the `buildRustPackage` helper from `rustPlatform`:
20212121-```
2222+```nix
2223{ lib, rustPlatform }:
23242425rustPlatform.buildRustPackage rec {
···4950such as the one in the example above. `cargoHash` should instead be
5051used for [SRI](https://www.w3.org/TR/SRI/) hashes. For example:
51525252-```
5353+```nix
5354 cargoHash = "sha256-l1vL2ZdtDRxSGvP0X/l3nMw8+6WF67KPutJEzUROjg8=";
5455```
5556···5960then be taken from the failed build. A fake hash can be used for
6061`cargoSha256` as follows:
61626262-```
6363+```nix
6364 cargoSha256 = lib.fakeSha256;
6465```
65666667For `cargoHash` you can use:
67686868-```
6969+```nix
6970 cargoHash = lib.fakeHash;
7071```
7172···262263source code in a reproducible way. If it is missing or out-of-date one can use
263264the `cargoPatches` attribute to update or add it.
264265265265-```
266266+```nix
266267rustPlatform.buildRustPackage rec {
267268 (...)
268269 cargoPatches = [
···489490490491Now, the file produced by the call to `carnix`, called `hello.nix`, looks like:
491492492492-```
493493+```nix
493494# Generated by carnix 0.6.5: carnix -o hello.nix --src ./. Cargo.lock --standalone
494495{ stdenv, buildRustCrate, fetchgit }:
495496let kernel = stdenv.buildPlatform.parsed.kernel.name;
···518519`Cargo.lock`. Then, `carnix` needs to be run again, and produces the
519520following nix file:
520521521521-```
522522+```nix
522523# Generated by carnix 0.6.5: carnix -o hello.nix --src ./. Cargo.lock --standalone
523524{ stdenv, buildRustCrate, fetchgit }:
524525let kernel = stdenv.buildPlatform.parsed.kernel.name;
···573574Starting from that file, one can add more overrides, to add features
574575or build inputs by overriding the hello crate in a seperate file.
575576576576-```
577577+```nix
577578with import <nixpkgs> {};
578579((import ./hello.nix).hello {}).override {
579580 crateOverrides = defaultCrateOverrides // {
···593594the override above can be read, as in the following example, which
594595patches the derivation:
595596596596-```
597597+```nix
597598with import <nixpkgs> {};
598599((import ./hello.nix).hello {}).override {
599600 crateOverrides = defaultCrateOverrides // {
···614615`libc` in the example above, where `libc` is a dependency of the main
615616crate, we could do:
616617617617-```
618618+```nix
618619with import <nixpkgs> {};
619620((import hello.nix).hello {}).override {
620621 crateOverrides = defaultCrateOverrides // {
···630631631632- The version of rustc used to compile the crate:
632633633633- ```
634634+ ```nix
634635 (hello {}).override { rust = pkgs.rust; };
635636 ```
636637637638- Whether to build in release mode or debug mode (release mode by
638639 default):
639640640640- ```
641641+ ```nix
641642 (hello {}).override { release = false; };
642643 ```
643644644645- Whether to print the commands sent to rustc when building
645646 (equivalent to `--verbose` in cargo:
646647647647- ```
648648+ ```nix
648649 (hello {}).override { verbose = false; };
649650 ```
650651651652- Extra arguments to be passed to `rustc`:
652653653653- ```
654654+ ```nix
654655 (hello {}).override { extraRustcOpts = "-Z debuginfo=2"; };
655656 ```
656657···662663 `postInstall`. As an example, here is how to create a new module
663664 before running the build script:
664665665665- ```
666666+ ```nix
666667 (hello {}).override {
667668 preConfigure = ''
668669 echo "pub const PATH=\"${hi.out}\";" >> src/path.rs"
···676677compile `diesel_cli` only with the `postgres` feature, and no default
677678features, we would write:
678679679679-```
680680+```nix
680681(callPackage ./diesel.nix {}).diesel {
681682 default = false;
682683 postgres = true;
···699700700701A typical `shell.nix` might look like:
701702702702-```
703703+```nix
703704with import <nixpkgs> {};
704705705706stdenv.mkDerivation {
···721722```
722723723724You should now be able to run the following:
724724-```
725725+```ShellSesssion
725726$ nix-shell --pure
726727$ cargo build
727728$ cargo test
···731732To control your rust version (i.e. use nightly) from within `shell.nix` (or
732733other nix expressions) you can use the following `shell.nix`
733734734734-```
735735+```nix
735736# Latest Nightly
736737with import <nixpkgs> {};
737738let src = fetchFromGitHub {
···759760```
760761761762Now run:
762762-```
763763+```ShellSession
763764$ rustc --version
764765rustc 1.26.0-nightly (188e693b3 2018-03-26)
765766```
···794795795796Add the following to your `configuration.nix`, `home-configuration.nix`, `shell.nix`, or similar:
796797797797-```
798798+```nix
798799{ pkgs ? import <nixpkgs> {
799800 overlays = [
800801 (import (builtins.fetchTarball https://github.com/mozilla/nixpkgs-mozilla/archive/master.tar.gz))
+4-4
doc/languages-frameworks/vim.section.md
···156156157157First create a vim-scripts file having one plugin name per line. Example:
158158159159-```
159159+```vim
160160"tlib"
161161{'name': 'vim-addon-sql'}
162162{'filetype_regex': '\%(vim)$', 'names': ['reload', 'vim-dev-plugin']}
···197197You should get a Vim buffer with the nix derivations (output1) and vam.pluginDictionaries (output2).
198198You can add your Vim to your system's configuration file like this and start it by "vim-my":
199199200200-```
200200+```nix
201201my-vim =
202202 let plugins = let inherit (vimUtils) buildVimPluginFrom2Nix; in {
203203 copy paste output1 here
···217217218218Sample output1:
219219220220-```
220220+```nix
221221"reload" = buildVimPluginFrom2Nix { # created by nix#NixDerivation
222222 name = "reload";
223223 src = fetchgit {
···248248249249Some plugins require overrides in order to function properly. Overrides are placed in [overrides.nix](/pkgs/misc/vim-plugins/overrides.nix). Overrides are most often required when a plugin requires some dependencies, or extra steps are required during the build process. For example `deoplete-fish` requires both `deoplete-nvim` and `vim-fish`, and so the following override was added:
250250251251-```
251251+```nix
252252deoplete-fish = super.deoplete-fish.overrideAttrs(old: {
253253 dependencies = with super; [ deoplete-nvim vim-fish ];
254254});
+1-1
lib/trivial.nix
···158158 seq deepSeq genericClosure;
159159160160161161- ## nixpks version strings
161161+ ## nixpkgs version strings
162162163163 /* Returns the current full nixpkgs version number. */
164164 version = release + versionSuffix;
···591591 # password or an SSH authorized key. Privileged accounts are
592592 # root and users in the wheel group.
593593 assertion = !cfg.mutableUsers ->
594594- any id ((mapAttrsToList (name: cfg:
595595- (name == "root"
594594+ any id ((mapAttrsToList (_: cfg:
595595+ (cfg.name == "root"
596596 || cfg.group == "wheel"
597597 || elem "wheel" cfg.extraGroups)
598598 &&
···613613 assertion = (user.hashedPassword != null)
614614 -> (builtins.match ".*:.*" user.hashedPassword == null);
615615 message = ''
616616- The password hash of user "${name}" contains a ":" character.
616616+ The password hash of user "${user.name}" contains a ":" character.
617617 This is invalid and would break the login system because the fields
618618 of /etc/shadow (file where hashes are stored) are colon-separated.
619619- Please check the value of option `users.users."${name}".hashedPassword`.'';
619619+ Please check the value of option `users.users."${user.name}".hashedPassword`.'';
620620 }
621621 );
622622623623 warnings =
624624 builtins.filter (x: x != null) (
625625- flip mapAttrsToList cfg.users (name: user:
625625+ flip mapAttrsToList cfg.users (_: user:
626626 # This regex matches a subset of the Modular Crypto Format (MCF)[1]
627627 # informal standard. Since this depends largely on the OS or the
628628 # specific implementation of crypt(3) we only support the (sane)
···645645 && user.hashedPassword != "" # login without password
646646 && builtins.match mcf user.hashedPassword == null)
647647 then ''
648648- The password hash of user "${name}" may be invalid. You must set a
648648+ The password hash of user "${user.name}" may be invalid. You must set a
649649 valid hash or the user will be locked out of their account. Please
650650- check the value of option `users.users."${name}".hashedPassword`.''
650650+ check the value of option `users.users."${user.name}".hashedPassword`.''
651651 else null
652652 ));
653653
···11+{ config, lib, pkgs, ... }:
22+33+with lib;
44+let
55+ cfg = config.services.jmusicbot;
66+in
77+{
88+ options = {
99+ services.jmusicbot = {
1010+ enable = mkEnableOption "jmusicbot, a Discord music bot that's easy to set up and run yourself";
1111+1212+ stateDir = mkOption {
1313+ type = types.path;
1414+ description = ''
1515+ The directory where config.txt and serversettings.json is saved.
1616+ If left as the default value this directory will automatically be created before JMusicBot starts, otherwise the sysadmin is responsible for ensuring the directory exists with appropriate ownership and permissions.
1717+ Untouched by the value of this option config.txt needs to be placed manually into this directory.
1818+ '';
1919+ default = "/var/lib/jmusicbot/";
2020+ };
2121+ };
2222+ };
2323+2424+ config = mkIf cfg.enable {
2525+ systemd.services.jmusicbot = {
2626+ wantedBy = [ "multi-user.target" ];
2727+ after = [ "network-online.target" ];
2828+ description = "Discord music bot that's easy to set up and run yourself!";
2929+ serviceConfig = mkMerge [{
3030+ ExecStart = "${pkgs.jmusicbot}/bin/JMusicBot";
3131+ WorkingDirectory = cfg.stateDir;
3232+ Restart = "always";
3333+ RestartSec = 20;
3434+ DynamicUser = true;
3535+ }
3636+ (mkIf (cfg.stateDir == "/var/lib/jmusicbot") { StateDirectory = "jmusicbot"; })];
3737+ };
3838+ };
3939+4040+ meta.maintainers = with maintainers; [ SuperSandro2000 ];
4141+}
+11-1
nixos/modules/services/hardware/sane.nix
···3030 };
31313232 backends = [ pkg netConf ] ++ optional config.services.saned.enable sanedConf ++ config.hardware.sane.extraBackends;
3333- saneConfig = pkgs.mkSaneConfig { paths = backends; };
3333+ saneConfig = pkgs.mkSaneConfig { paths = backends; inherit (config.hardware.sane) disabledDefaultBackends; };
34343535 enabled = config.hardware.sane.enable || config.services.saned.enable;
3636···7171 </para></note>
7272 '';
7373 example = literalExample "[ pkgs.hplipWithPlugin ]";
7474+ };
7575+7676+ hardware.sane.disabledDefaultBackends = mkOption {
7777+ type = types.listOf types.str;
7878+ default = [];
7979+ example = [ "v4l" ];
8080+ description = ''
8181+ Names of backends which are enabled by default but should be disabled.
8282+ See <literal>$SANE_CONFIG_DIR/dll.conf</literal> for the list of possible names.
8383+ '';
7484 };
75857686 hardware.sane.configDir = mkOption {
···11+# This file contains the base package, some of which is compiled.
22+# Runtime glue to optinal runtime dependencies is in 'default.nix'.
33+{ fetchurl, lib, qt5
44+55+# python deps
66+, python, buildPythonPackage
77+, alembic, beautifulsoup4, chardet, lxml, Mako, pyenchant
88+, pyqt5_with_qtwebkit, pyxdg, sip, sqlalchemy, sqlalchemy_migrate
99+}:
1010+1111+buildPythonPackage rec {
1212+ pname = "openlp";
1313+ version = "2.4.6";
1414+1515+ src = fetchurl {
1616+ url = "https://get.openlp.org/${version}/OpenLP-${version}.tar.gz";
1717+ sha256 = "f63dcf5f1f8a8199bf55e806b44066ad920d26c9cf67ae432eb8cdd1e761fc30";
1818+ };
1919+2020+ doCheck = false;
2121+ # FIXME: checks must be disabled because they are lacking the qt env.
2222+ # They fail like this, even if built and wrapped with all Qt and
2323+ # runtime dependencies:
2424+ #
2525+ # running install tests
2626+ # qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in ""
2727+ # This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
2828+ #
2929+ # Available platform plugins are: wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx.
3030+ #
3131+ # See also https://discourse.nixos.org/t/qt-plugin-path-unset-in-test-phase/
3232+3333+ #checkInputs = [ mock nose ];
3434+ nativeBuildInputs = [ qt5.qttools ];
3535+ propagatedBuildInputs = [
3636+ alembic
3737+ beautifulsoup4
3838+ chardet
3939+ lxml
4040+ Mako
4141+ pyenchant
4242+ pyqt5_with_qtwebkit
4343+ pyxdg
4444+ sip
4545+ sqlalchemy
4646+ sqlalchemy_migrate
4747+ ];
4848+4949+ prePatch = ''
5050+ echo 'from vlc import *' > openlp/core/ui/media/vendor/vlc.py
5151+ '';
5252+5353+ dontWrapQtApps = true;
5454+ dontWrapGApps = true;
5555+ postInstall = ''
5656+ ( # use subshell because of cd
5757+ tdestdir="$out/i18n"
5858+ mkdir -p "$tdestdir"
5959+ cd ./resources/i18n
6060+ for file in *.ts; do
6161+ lconvert -i "$file" -o "$tdestdir/''${file%%ts}qm"
6262+ done
6363+ )
6464+ '';
6565+6666+ preFixup = ''
6767+ rm -r $out/${python.sitePackages}/tests
6868+ rm -r $out/bin
6969+ '';
7070+7171+ meta = with lib; {
7272+ description = "Free church presentation software";
7373+ homepage = "https://openlp.org/";
7474+ downloadPage = "https://openlp.org/#downloads";
7575+ platforms = platforms.unix;
7676+ license = licenses.gpl2Only;
7777+ maintainers = [ maintainers.jorsn ];
7878+7979+ longDescription = ''
8080+ OpenLP is a free church presentation software.
8181+8282+ Features:
8383+8484+ * Cross platform between Linux, Windows, OS X and FreeBSD
8585+ * Display songs, Bible verses, presentations, images, audio and video
8686+ * Control OpenLP remotely via the Android remote, iOS remote or mobile web browser
8787+ * Quickly and easily import songs from other popular presentation packages
8888+ * Easy enough to use to get up and running in less than 10 minutes
8989+9090+ Remark: This pkg only supports sqlite dbs. If you wish to have support for
9191+ mysql or postgresql dbs, or Jenkins, please contact the maintainer.
9292+9393+ Bugs which affect this software packaged in Nixpkgs:
9494+9595+ 1. The package must disable checks, because they are lacking the qt env.
9696+ (see pkg source and https://discourse.nixos.org/t/qt-plugin-path-unset-in-test-phase/)
9797+ 2. There is a segfault on exit. Not a real problem, according to debug log, everything
9898+ shuts down correctly. Maybe related to https://forums.openlp.org/discussion/3620/crash-on-exit.
9999+ Plan: Wait for OpenLP-3, since it is already in beta 1
100100+ (2021-02-09; news: https://openlp.org/blog/).
101101+ '';
102102+ };
103103+}
+25
pkgs/applications/misc/openring/default.nix
···11+{ buildGoModule, fetchFromSourcehut, lib }:
22+33+buildGoModule rec {
44+ pname = "openring";
55+ version = "unstable-2021-04-03";
66+77+ src = fetchFromSourcehut {
88+ owner = "~sircmpwn";
99+ repo = pname;
1010+ rev = "f13edb5dfd882ce608d61cf6b6740650ce9d84a3";
1111+ sha256 = "sha256-Z65V77JZ9jCzBg7T2+d5Agxxd+MV2R7nYcLedYP5eOE=";
1212+ };
1313+1414+ vendorSha256 = "sha256-BbBTmkGyLrIWphXC+dBaHaVzHuXRZ+4N/Jt2k3nF7Z4=";
1515+1616+ # The package has no tests.
1717+ doCheck = false;
1818+1919+ meta = with lib; {
2020+ description = "A webring for static site generators";
2121+ homepage = "https://git.sr.ht/~sircmpwn/openring";
2222+ license = licenses.gpl3Only;
2323+ maintainers = with maintainers; [ sumnerevans ];
2424+ };
2525+}
···7788buildPythonPackage rec {
99 pname = "HyperKitty";
1010+ # Note: Mailman core must be on the latest version before upgrading HyperKitty.
1111+ # See: https://gitlab.com/mailman/postorius/-/issues/516#note_544571309
1012 version = "1.3.3";
1113 disabled = !isPy3k;
1214
+2
pkgs/servers/mail/mailman/postorius.nix
···4455buildPythonPackage rec {
66 pname = "postorius";
77+ # Note: Mailman core must be on the latest version before upgrading Postorious.
88+ # See: https://gitlab.com/mailman/postorius/-/issues/516#note_544571309
79 version = "1.3.4";
810911 src = fetchPypi {
···11+{ lib, rustPlatform, fetchFromGitHub
22+, clang, llvmPackages, pkg-config
33+, dbus, fuse, sqlite
44+}:
55+66+rustPlatform.buildRustPackage rec {
77+ pname = "supertag";
88+ version = "0.1.4";
99+1010+ src = fetchFromGitHub {
1111+ owner = "amoffat";
1212+ repo = pname;
1313+ rev = "v${version}";
1414+ sha256 = "0jzm7pn38hlr96n0z8gqfsfdbw48y0nnbsgjdq7hpgwmcgvgqdam";
1515+ };
1616+1717+ cargoSha256 = "1mzmp1jcxgn2swp52r9y7k09fk0z67i1qafzkkzlfxxd10vfr70v";
1818+1919+ LIBCLANG_PATH = "${llvmPackages.libclang}/lib";
2020+2121+ nativeBuildInputs = [ clang pkg-config ];
2222+ buildInputs = [ dbus fuse sqlite ];
2323+2424+ # The test are requiring extended permissions.
2525+ doCheck = false;
2626+2727+ meta = with lib; {
2828+ description = "A tag-based filesystem";
2929+ longDescription = ''
3030+ Supertag is a tag-based filesystem, written in Rust, for Linux and MacOS.
3131+ It provides a tag-based view of your files by removing the hierarchy
3232+ constraints typically imposed on files and folders. In other words, it
3333+ allows you to think about your files not as objects stored in folders, but
3434+ as objects that can be filtered by folders.
3535+ '';
3636+ homepage = "https://github.com/amoffat/supertag";
3737+ license = licenses.agpl3Plus;
3838+ platforms = [ "i686-linux" "x86_64-linux" ];
3939+ maintainers = with maintainers; [ oxzi ];
4040+ };
4141+}
···11+{ fetchzip, lib, stdenv, which }:
22+33+stdenv.mkDerivation rec {
44+ pname = "empty";
55+ version = "0.6.21b";
66+77+ src = fetchzip {
88+ url = "mirror://sourceforge/${pname}/${pname}/${pname}-${version}.tgz";
99+ sha256 = "1rkixh2byr70pdxrwr4lj1ckh191rjny1m5xbjsa7nqw1fw6c2xs";
1010+ stripRoot = false;
1111+ };
1212+1313+ patches = [
1414+ ./0.6-Makefile.patch
1515+ ];
1616+1717+ nativeBuildInputs = [ which ];
1818+1919+ makeFlags = [ "PREFIX=$(out)" ];
2020+2121+ postPatch = ''
2222+ rm empty
2323+ '';
2424+2525+ meta = with lib; {
2626+ homepage = "http://empty.sourceforge.net";
2727+ description = "A simple tool to automate interactive terminal applications";
2828+ license = licenses.bsd3;
2929+ platforms = platforms.all;
3030+ longDescription = ''
3131+ The empty utility provides an interface to execute and/or interact with
3232+ processes under pseudo-terminal sessions (PTYs). This tool is definitely
3333+ useful in programming of shell scripts designed to communicate with
3434+ interactive programs like telnet, ssh, ftp, etc. In some cases empty can
3535+ be the simplest replacement for TCL/expect or other similar programming
3636+ tools because empty:
3737+3838+ - can be easily invoked directly from shell prompt or script
3939+ - does not use TCL, Perl, PHP, Python or anything else as an underlying language
4040+ - is written entirely in C
4141+ - has small and simple source code
4242+ - can easily be ported to almost all UNIX-like systems
4343+ '';
4444+ maintainers = [ maintainers.djwf ];
4545+ };
4646+}
···2020, pam
2121, etcDir ? null
2222, withKerberos ? true
2323-, kerberos
2323+, libkrb5
2424, libfido2
2525, withFIDO ? stdenv.hostPlatform.isUnix && !stdenv.hostPlatform.isMusl
2626, linkOpenssl ? true
···4545 '';
46464747 nativeBuildInputs = [ pkg-config ]
4848- # This is not the same as the kerberos from the inputs! pkgs.kerberos is
4848+ # This is not the same as the libkrb5 from the inputs! pkgs.libkrb5 is
4949 # needed here to access krb5-config in order to cross compile. See:
5050 # https://github.com/NixOS/nixpkgs/pull/107606
5151- ++ optional withKerberos pkgs.kerberos
5151+ ++ optional withKerberos pkgs.libkrb5
5252 ++ extraNativeBuildInputs;
5353 buildInputs = [ zlib openssl libedit ]
5454 ++ optional withFIDO libfido2
5555- ++ optional withKerberos kerberos
5555+ ++ optional withKerberos libkrb5
5656 ++ optional stdenv.isLinux pam;
57575858 preConfigure = ''
···7070 # Kerberos can be found either by krb5-config or by fall-back shell
7171 # code in openssh's configure.ac. Neither of them support static
7272 # build, but patching code for krb5-config is simpler, so to get it
7373- # into PATH, kerberos.dev is added into buildInputs.
7373+ # into PATH, libkrb5.dev is added into buildInputs.
7474 + optionalString stdenv.hostPlatform.isStatic ''
7575 sed -i "s,PKGCONFIG --libs,PKGCONFIG --libs --static,g" configure
7676 sed -i 's#KRB5CONF --libs`#KRB5CONF --libs` -lkrb5support -lkeyutils#g' configure
···8989 (if stdenv.isLinux then "--with-pam" else "--without-pam")
9090 ] ++ optional (etcDir != null) "--sysconfdir=${etcDir}"
9191 ++ optional withFIDO "--with-security-key-builtin=yes"
9292- ++ optional withKerberos (assert kerberos != null; "--with-kerberos5=${kerberos}")
9292+ ++ optional withKerberos (assert libkrb5 != null; "--with-kerberos5=${libkrb5}")
9393 ++ optional stdenv.isDarwin "--disable-libutil"
9494 ++ optional (!linkOpenssl) "--without-openssl";
9595