noogle/pasta/flake-module.nix

26 lines
740 B
Nix
Raw Normal View History

{ inputs, ... }: {
2023-12-22 22:34:22 +03:00
perSystem = { self', inputs', pkgs, lib, ... }:
let
inherit (inputs'.nix.packages) nix;
2023-12-22 22:34:22 +03:00
nixpkgs = self'.packages.nixpkgs-migrated;
2024-03-25 13:47:43 +03:00
sourceInfo' = {
inherit (inputs.nixpkgs-master.sourceInfo) rev lastModified;
};
metaFile = builtins.toFile "meta.json" (builtins.toJSON sourceInfo');
2023-11-28 19:28:51 +03:00
in
{
packages = {
2023-12-22 22:34:22 +03:00
pasta-meta = pkgs.stdenv.mkDerivation {
name = "pasta-meta";
src = ./.;
buildPhase = ''
2024-03-25 13:47:43 +03:00
cat ${metaFile} > $out
2023-12-22 22:34:22 +03:00
'';
};
pasta = pkgs.callPackage ./default.nix { inherit nixpkgs nix pkgs; };
};
devShells.pastaMaker = pkgs.callPackage ./shell.nix { inherit pkgs nix; };
};
}