2022-09-23 16:45:55 -06:00
|
|
|
{
|
|
|
|
description = "openbsd.app: a tool to search OpenBSD packages";
|
|
|
|
|
2023-08-08 07:13:51 -06:00
|
|
|
inputs.nixpkgs.url = "nixpkgs";
|
2022-09-23 16:45:55 -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 {
|
|
|
|
packages = forAllSystems (system:
|
|
|
|
let pkgs = nixpkgsFor.${system};
|
|
|
|
in {
|
|
|
|
thing = pkgs.stdenv.mkDerivation {
|
|
|
|
pname = "openbsd.app";
|
|
|
|
version = "v0.0.1";
|
|
|
|
src = ./.;
|
|
|
|
nativeBuildInputs = with pkgs.perlPackages; [
|
|
|
|
perl
|
|
|
|
Mojolicious
|
|
|
|
MojoSQLite
|
2023-08-08 07:13:51 -06:00
|
|
|
pkgs.outils
|
2022-09-23 16:45:55 -06:00
|
|
|
];
|
|
|
|
buildInputs = with pkgs; [ perl ];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
install -t openbsd.app.pl $out/bin
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
});
|
|
|
|
|
|
|
|
defaultPackage = forAllSystems (system: self.packages.${system}.thing);
|
|
|
|
devShells = forAllSystems (system:
|
|
|
|
let pkgs = nixpkgsFor.${system};
|
|
|
|
in {
|
|
|
|
default = pkgs.mkShell {
|
|
|
|
shellHook = ''
|
|
|
|
PS1='\u@\h:\@; '
|
|
|
|
echo "Perl `${pkgs.perl}/bin/perl --version`"
|
|
|
|
'';
|
2022-09-23 22:16:13 -06:00
|
|
|
buildInputs = with pkgs.perlPackages; [ PerlTidy pkgs.sqlite ];
|
2022-09-23 16:45:55 -06:00
|
|
|
nativeBuildInputs = with pkgs.perlPackages; [
|
|
|
|
perl
|
|
|
|
Mojolicious
|
|
|
|
MojoSQLite
|
2023-08-08 07:13:51 -06:00
|
|
|
pkgs.outils
|
2022-09-23 16:45:55 -06:00
|
|
|
];
|
|
|
|
};
|
|
|
|
});
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|