Uutils: Difference between revisions

mNo edit summary
mNo edit summary
 
Line 38: Line 38:
{{File|3={ pkgs, ... }:
{{File|3={ pkgs, ... }:
let
let
   coreutils-full-name = "coreuutils-full-" + builtins.concatStringsSep ""
   coreutils-full-name = "coreuutils-full" + builtins.concatStringsSep ""
     (builtins.genList (_: "v") ((builtins.stringLength pkgs.coreutils-full.version) - 1));
     (builtins.genList (_: "_") (builtins.stringLength pkgs.coreutils-full.version));


   coreutils-name = "coreuutils-" + builtins.concatStringsSep ""
   coreutils-name = "coreuutils" + builtins.concatStringsSep ""
     (builtins.genList (_: "v") ((builtins.stringLength pkgs.coreutils.version) - 1));
     (builtins.genList (_: "_") (builtins.stringLength pkgs.coreutils.version));


   findutils-name = "finduutils-" + builtins.concatStringsSep ""
   findutils-name = "finduutils" + builtins.concatStringsSep ""
     (builtins.genList (_: "v") ((builtins.stringLength pkgs.findutils.version) - 1));
     (builtins.genList (_: "_") (builtins.stringLength pkgs.findutils.version));


   diffutils-name = "diffuutils-" + builtins.concatStringsSep ""
   diffutils-name = "diffuutils" + builtins.concatStringsSep ""
     (builtins.genList (_: "v") ((builtins.stringLength pkgs.diffutils.version) - 1));
     (builtins.genList (_: "_") (builtins.stringLength pkgs.diffutils.version));
in
in
{
{
Line 94: Line 94:
}|name=/etc/nixos/configuration.nix|lang=nix}}
}|name=/etc/nixos/configuration.nix|lang=nix}}


It should be noted that this is of course still quite a hacky solution, as the name of the resulting binaries will simply be padded with the char 'v'. A better solution might be found in the future.
It should be noted that this is of course still quite a hacky solution, as the name of the resulting binaries will simply be padded with the char '_'. A better solution might be found in the future.


<small>For details, see [https://discourse.nixos.org/t/how-to-use-uutils-coreutils-instead-of-the-builtin-coreutils/8904/36?u=malix NixOS - Discourse: "How to use uutils-coreutils instead of the builtin coreutils?" (8904) - Comment 36]</small>}}
<small>For details, see [https://discourse.nixos.org/t/how-to-use-uutils-coreutils-instead-of-the-builtin-coreutils/8904/36?u=malix NixOS - Discourse: "How to use uutils-coreutils instead of the builtin coreutils?" (8904) - Comment 36]</small>}}