···116116a `Cargo.lock` file using the `cargoLock` argument. For example:
117117118118```nix
119119-rustPlatform.buildRustPackage rec {
119119+rustPlatform.buildRustPackage {
120120 pname = "myproject";
121121 version = "1.0.0";
122122123123 cargoLock = {
124124 lockFile = ./Cargo.lock;
125125- }
125125+ };
126126127127 # ...
128128}
129129```
130130131131This will retrieve the dependencies using fixed-output derivations from
132132-the specified lockfile. Note that setting `cargoLock.lockFile` doesn't
133133-add a `Cargo.lock` to your `src`, and a `Cargo.lock` is still required
134134-to build a rust package. A simple fix is to use:
132132+the specified lockfile.
133133+134134+One caveat is that `Cargo.lock` cannot be patched in the `patchPhase`
135135+because it runs after the dependencies have already been fetched. If
136136+you need to patch or generate the lockfile you can alternatively set
137137+`cargoLock.lockFileContents` to a string of its contents:
138138+139139+```nix
140140+rustPlatform.buildRustPackage {
141141+ pname = "myproject";
142142+ version = "1.0.0";
143143+144144+ cargoLock = let
145145+ fixupLockFile = path: f (builtins.readFile path);
146146+ in {
147147+ lockFileContents = fixupLockFile ./Cargo.lock;
148148+ };
149149+150150+ # ...
151151+}
152152+```
153153+154154+Note that setting `cargoLock.lockFile` or `cargoLock.lockFileContents`
155155+doesn't add a `Cargo.lock` to your `src`, and a `Cargo.lock` is still
156156+required to build a rust package. A simple fix is to use:
135157136158```nix
137159postPatch = ''
+13-1
nixos/modules/config/malloc.nix
···3030 vulnerabilities, while maintaining good performance.
3131 '';
3232 };
3333+3434+ mimalloc = {
3535+ libPath = "${pkgs.mimalloc}/lib/libmimalloc.so";
3636+ description = ''
3737+ A compact and fast general purpose allocator, which may
3838+ optionally be built with mitigations against various heap
3939+ vulnerabilities.
4040+ '';
4141+ };
3342 };
34433544 providerConf = providers.${cfg.provider};
···91100 "abstractions/base" = ''
92101 r /etc/ld-nix.so.preload,
93102 r ${config.environment.etc."ld-nix.so.preload".source},
9494- mr ${providerLibPath},
103103+ include "${pkgs.apparmorRulesFromClosure {
104104+ name = "mallocLib";
105105+ baseRules = ["mr $path/lib/**.so*"];
106106+ } [ mallocLib ] }"
95107 '';
96108 };
97109 };
···2222 "mips64"
2323 else if isMsp430 then
2424 "msp430"
2525- else if isPowerPC && is32bit then
2525+ else if isPower && is32bit then
2626 "powerpc"
2727- else if isPowerPC && is64bit then
2727+ else if isPower && is64bit then
2828 "powerpc64"
2929 else if isRiscV && is64bit then
3030 "riscv64"
···1111, zlib
1212}: stdenv.mkDerivation rec {
1313 pname = "roon-server";
1414- version = "1.8-814";
1414+ version = "1.8-831";
15151616 # N.B. The URL is unstable. I've asked for them to provide a stable URL but
1717 # they have ignored me. If this package fails to build for you, you may need
1818 # to update the version and sha256.
1919 # c.f. https://community.roonlabs.com/t/latest-roon-server-is-not-available-for-download-on-nixos/118129
2020 src = fetchurl {
2121- url = "https://web.archive.org/web/20210729154130/http://download.roonlabs.com/builds/RoonServer_linuxx64.tar.bz2";
2222- sha256 = "sha256-GbWcgNq+dmzoHNFZyB/QFCvJ7Hh48v8IuGS4WMNlKgI=";
2121+ url = "https://web.archive.org/web/20210921161727/http://download.roonlabs.com/builds/RoonServer_linuxx64.tar.bz2";
2222+ sha256 = "sha256-SeMSC7K6DV7rVr1w/SqMnLvipoWbypS/gJnSZmpfXZk=";
2323 };
24242525 buildInputs = [
···11+{ stdenv
22+, lib
33+, cmake
44+, extra-cmake-modules
55+, fetchFromGitHub
66+, kcolorpicker
77+, kimageannotator
88+, qtsvg
99+, qttranslations
1010+, qtx11extras
1111+}:
1212+1313+stdenv.mkDerivation rec {
1414+ pname = "ksnip";
1515+ version = "1.9.1";
1616+1717+ src = fetchFromGitHub {
1818+ owner = "ksnip";
1919+ repo = "ksnip";
2020+ rev = "v${version}";
2121+ sha256 = "1izsk586n9fbm0di0hj6pxs7r0a6w554gpad1ghf247icr0pfc1l";
2222+ };
2323+2424+ dontWrapQtApps = true;
2525+2626+ nativeBuildInputs = [
2727+ cmake
2828+ extra-cmake-modules
2929+ ];
3030+3131+ buildInputs = [
3232+ kcolorpicker
3333+ kimageannotator
3434+ qtsvg
3535+ qttranslations
3636+ qtx11extras
3737+ ];
3838+3939+ meta = with lib; {
4040+ homepage = "https://github.com/ksnip/ksnip";
4141+ description = "Cross-platform screenshot tool wihth many annotation features";
4242+ longDescription = ''
4343+ Features:
4444+4545+ - Supports Linux (X11, Plasma Wayland, GNOME Wayland and xdg-desktop-portal Wayland), Windows and macOS.
4646+ - Screenshot of a custom rectangular area that can be drawn with mouse cursor.
4747+ - Screenshot of last selected rectangular area without selecting again.
4848+ - Screenshot of the screen/monitor where the mouse cursor is currently located.
4949+ - Screenshot of full-screen, including all screens/monitors.
5050+ - Screenshot of window that currently has focus.
5151+ - Screenshot of window under mouse cursor.
5252+ - Screenshot with or without mouse cursor.
5353+ - Capture mouse cursor as annotation item that can be moved and deleted.
5454+ - Customizable capture delay for all capture options.
5555+ - Upload screenshots directly to imgur.com in anonymous or user mode.
5656+ - Upload screenshots via custom user defined scripts.
5757+ - Command-line support, for capturing screenshots and saving to default location, filename and format.
5858+ - Filename wildcards for Year ($Y), Month ($M), Day ($D), Time ($T) and Counter (multiple # characters for number with zero-leading padding).
5959+ - Print screenshot or save it to PDF/PS.
6060+ - Annotate screenshots with pen, marker, rectangles, ellipses, texts and other tools.
6161+ - Annotate screenshots with stickers and add custom stickers.
6262+ - Obfuscate image regions with blur and pixelate.
6363+ - Add effects to image (Drop Shadow, Grayscale, invert color or Border).
6464+ - Add watermarks to captured images.
6565+ - Global hotkeys for capturing screenshots (currently only for Windows and X11).
6666+ - Tabs for screenshots and images.
6767+ - Open existing images via dialog, drag-and-drop or paste from clipboard.
6868+ - Run as single instance application (secondary instances send cli parameter to primary instance).
6969+ - Pin screenshots in frameless windows that stay atop other windows.
7070+ - User-defined actions for taking screenshot and post-processing.
7171+ - Many configuration options.
7272+ '';
7373+ license = licenses.gpl2Plus;
7474+ maintainers = with maintainers; [ x3ro ];
7575+ platforms = platforms.linux;
7676+ };
7777+}