Skip to content

Commit

Permalink
flake: add overlay
Browse files Browse the repository at this point in the history
  • Loading branch information
phlmn committed Jan 13, 2025
1 parent eb1b290 commit 2934ecc
Showing 1 changed file with 34 additions and 2 deletions.
36 changes: 34 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,42 @@
self,
...
}:
{
overlays.default = (final: prev:
let
pkgs = prev;
lib = pkgs.lib;
in
{
transcribee-backend = import ./nix/pkgs/backend.nix {
inherit pkgs lib uv2nix pyproject-nix pyproject-build-systems;
python = prev.python311;
};

transcribee-frontend = import ./nix/pkgs/frontend.nix {
inherit pkgs lib;

versionInfo = {
commitHash = if (self ? rev) then self.rev else self.dirtyRev;
commitDate = lib.readFile "${prev.runCommand "timestamp" { env.when = self.lastModified; } "echo -n `date -d @$when --iso-8601=s` > $out"}";
};
};
});

modules = {
nixos = {
default = {
nixpkgs.overlays = [ self.overlays.default ];
};
};
};
} //
(flake-utils.lib.eachDefaultSystem
(system:
let
pkgs = nixpkgs.legacyPackages.${system};
pkgs = import nixpkgs {
inherit system;
};
lib = nixpkgs.lib;
python = pkgs.python311;

Expand All @@ -50,7 +82,7 @@
];
in
{
packages = rec {
packages = {
worker = (import ./nix/pkgs/worker.nix { inherit pkgs lib python uv2nix pyproject-nix pyproject-build-systems; });
backend = (import ./nix/pkgs/backend.nix { inherit pkgs lib python uv2nix pyproject-nix pyproject-build-systems; });
frontend = (import ./nix/pkgs/frontend.nix {
Expand Down

0 comments on commit 2934ecc

Please sign in to comment.