2023-05-22 19:12:52 -06:00
|
|
|
{
|
2023-05-22 19:39:52 -06:00
|
|
|
description =
|
|
|
|
"pr-status: a tool to query NixOS/nixpkgs pull request status as they move along the build chain";
|
2023-05-22 19:12:52 -06:00
|
|
|
|
2024-03-23 08:46:26 -06:00
|
|
|
inputs.nixpkgs.url = "nixpkgs/nixos-unstable";
|
2023-05-22 19:12:52 -06:00
|
|
|
|
|
|
|
outputs = { self, nixpkgs }:
|
|
|
|
let
|
|
|
|
supportedSystems =
|
|
|
|
[ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ];
|
|
|
|
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
|
|
|
|
nixpkgsFor = forAllSystems (system: import nixpkgs { inherit system; });
|
|
|
|
in {
|
2023-05-22 19:39:52 -06:00
|
|
|
overlay = final: prev: {
|
|
|
|
pr-status = self.packages.${prev.system}.pr-status;
|
|
|
|
};
|
|
|
|
nixosModule = import ./module.nix;
|
2023-05-22 19:12:52 -06:00
|
|
|
packages = forAllSystems (system:
|
|
|
|
let pkgs = nixpkgsFor.${system};
|
|
|
|
in {
|
2023-05-22 19:39:52 -06:00
|
|
|
pr-status = pkgs.perlPackages.buildPerlPackage {
|
2023-05-22 19:12:52 -06:00
|
|
|
pname = "pr-status";
|
2023-06-16 14:52:54 -06:00
|
|
|
version = "v0.0.4";
|
2023-05-22 19:12:52 -06:00
|
|
|
src = ./.;
|
2023-05-22 21:02:09 -06:00
|
|
|
buildInputs = with pkgs; [ makeWrapper ];
|
2023-05-22 19:12:52 -06:00
|
|
|
propagatedBuildInputs = with pkgs.perlPackages; [
|
|
|
|
Mojolicious
|
|
|
|
JSON
|
|
|
|
Git
|
|
|
|
];
|
|
|
|
|
2023-05-22 20:58:57 -06:00
|
|
|
postInstall = ''
|
2023-05-22 21:02:09 -06:00
|
|
|
wrapProgram $out/bin/pr-status.pl --prefix PATH : ${
|
|
|
|
nixpkgs.lib.makeBinPath [ pkgs.git pkgs.perl ]
|
|
|
|
}
|
2023-05-22 20:58:57 -06:00
|
|
|
'';
|
|
|
|
|
2023-05-22 19:12:52 -06:00
|
|
|
outputs = [ "out" "dev" ];
|
|
|
|
};
|
|
|
|
});
|
|
|
|
|
2023-05-22 19:39:52 -06:00
|
|
|
defaultPackage =
|
|
|
|
forAllSystems (system: self.packages.${system}.pr-status);
|
2023-05-22 19:12:52 -06:00
|
|
|
devShells = forAllSystems (system:
|
|
|
|
let pkgs = nixpkgsFor.${system};
|
2023-05-24 15:03:12 -06:00
|
|
|
npPackages = with pkgs; [
|
|
|
|
elmPackages.elm
|
|
|
|
elmPackages.elm-test
|
|
|
|
elmPackages.elm-live
|
2023-11-15 15:06:14 -07:00
|
|
|
elmPackages.elm-json
|
2023-05-24 15:03:12 -06:00
|
|
|
];
|
2023-05-22 19:12:52 -06:00
|
|
|
in {
|
|
|
|
default = pkgs.mkShell {
|
|
|
|
shellHook = ''
|
|
|
|
PS1='\u@\h:\@; '
|
|
|
|
nix flake run github:qbit/xin#flake-warn
|
|
|
|
echo "Perl `${pkgs.perl}/bin/perl --version`"
|
|
|
|
'';
|
|
|
|
buildInputs = with pkgs.perlPackages; [
|
|
|
|
Git
|
|
|
|
JSON
|
|
|
|
Mojolicious
|
|
|
|
perl
|
|
|
|
PerlCritic
|
|
|
|
PerlTidy
|
2023-05-24 15:03:12 -06:00
|
|
|
] ++ npPackages;
|
2023-05-22 19:12:52 -06:00
|
|
|
};
|
|
|
|
});
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|