~rjpcasalino/bss

6de4ef6bdd4895f2e300cacf21c441c7cd528200 — rjpc 2 months ago 57baf69
nixfmt
1 files changed, 30 insertions(+), 28 deletions(-)

M flake.nix
M flake.nix => flake.nix +30 -28
@@ 1,36 1,38 @@
{
  description = "A flake for building bss";

  inputs.nixpkgs.url = github:NixOS/nixpkgs/af0a54285ed4ff131f205517aeafb94a9a5898cb;
  inputs.nixpkgs.url =
    "github:NixOS/nixpkgs/af0a54285ed4ff131f205517aeafb94a9a5898cb";
  inputs.flake-utils.url = "github:numtide/flake-utils";

  outputs = { self, nixpkgs, flake-utils }:
  flake-utils.lib.eachDefaultSystem (system:
    with nixpkgs.legacyPackages.${system};
    let bss = 
        buildPerlPackage {
        pname = "bss";
        version = "0.1";
        src = self;
        propagatedBuildInputs = with perlPackages; [
         TemplateToolkit
         ModuleInstall
         ConfigIniFiles
         YAML
         TextMarkdown
         FilesysNotifySimple
        ];
        buildInputs = [
         makeWrapper
       ] ++ lib.optionals stdenv.isDarwin [ shortenPerlShebang ];
        postInstall = ''
          ${if stdenv.isDarwin then "shortenPerlShebang $out/lib/perl5/site_perl/${perl.version}/bss.pl" else ""}
          wrapProgram $out/lib/perl5/site_perl/${perl.version}/bss.pl --prefix PATH : ${lib.makeBinPath[ rsync ]}
        '';
      };
    in {
      defaultPackage = bss;
      }
  );
    flake-utils.lib.eachDefaultSystem (system:
      with nixpkgs.legacyPackages.${system};
      let
        bss = buildPerlPackage {
          pname = "bss";
          version = "0.1";
          src = self;
          propagatedBuildInputs = with perlPackages; [
            TemplateToolkit
            ModuleInstall
            ConfigIniFiles
            YAML
            TextMarkdown
            FilesysNotifySimple
          ];
          buildInputs = [ makeWrapper ]
            ++ lib.optionals stdenv.isDarwin [ shortenPerlShebang ];
          postInstall = ''
            ${if stdenv.isDarwin then
              "shortenPerlShebang $out/lib/perl5/site_perl/${perl.version}/bss.pl"
            else
              ""}
            wrapProgram $out/lib/perl5/site_perl/${perl.version}/bss.pl --prefix PATH : ${
              lib.makeBinPath [ rsync ]
            }
          '';
        };
      in { defaultPackage = bss; });
}