fix: build break

This commit is contained in:
Clansty 2022-10-12 16:02:01 +08:00
parent b4163b13f9
commit c54ce04dc3
4 changed files with 21 additions and 17 deletions

View File

@ -17,17 +17,17 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1662818301,
"narHash": "sha256-uRjbKN924ptf5CvQ4cfki3R9nIm5EhrJBeb/xUxwfcM=",
"lastModified": 1663924488,
"narHash": "sha256-cDXrhp+JqNL+UOBobEcp9A5L8svIqsGrf9waD7SodsY=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "a25f0b9bbdfedee45305da5d1e1410c5bcbd48f6",
"rev": "b225d54ffcfe905e45d60292db259dbee04324f9",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"rev": "b225d54ffcfe905e45d60292db259dbee04324f9",
"type": "github"
}
},

View File

@ -2,7 +2,7 @@
description = "Flake that configures Q2TG";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
nixpkgs.url = "github:NixOS/nixpkgs/b225d54ffcfe905e45d60292db259dbee04324f9";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }:
@ -10,14 +10,19 @@
packages = nixpkgs.lib.mapAttrs
(system: pkgs: {
default = import ./default.nix { inherit pkgs; };
tgs-to-gif = pkgs.callPackage "${import ./nixos/clansty-flake.nix pkgs}/packages/tgs-to-gif" { };
prisma-patched = pkgs.callPackage ./nixos/prismaPatched.nix { };
})
nixpkgs.legacyPackages;
nixosModules.default = import ./nixos/module.nix;
nixosModules.default = import ./nixos/module.nix { inherit self; };
} // flake-utils.lib.eachDefaultSystem
(system:
let pkgs = nixpkgs.legacyPackages.${system}; in
let
pkgs = nixpkgs.legacyPackages.${system};
flakePkgs = self.packages.${system};
in
{
devShells.default = import ./shell.nix { inherit pkgs; };
devShells.default = import ./shell.nix { inherit pkgs flakePkgs; };
}
);
}

View File

@ -1,3 +1,4 @@
{ self }:
{ pkgs, config, ... }:
with pkgs.lib;
@ -9,7 +10,7 @@ with pkgs.lib;
enable = mkEnableOption "Enables Q2TG service";
package = mkOption {
type = types.package;
default = import ../default.nix { inherit pkgs; };
default = self.packages.${pkgs.system}.default;
};
ffmpeg-package = mkOption {
type = types.package;
@ -17,11 +18,11 @@ with pkgs.lib;
};
tgs-to-gif-package = mkOption {
type = types.package;
default = pkgs.callPackage "${import ./clansty-flake.nix pkgs}/packages/tgs-to-gif" { };
default = self.packages.${pkgs.system}.tgs-to-gif;
};
prisma-package = mkOption {
type = types.package;
default = pkgs.callPackage ./prismaPatched.nix { };
default = self.packages.${pkgs.system}.prisma-patched;
};
tg.api-id = mkOption {
type = types.int;

View File

@ -1,11 +1,11 @@
{ pkgs ? import <nixpkgs> { } }:
{ pkgs, flakePkgs }:
pkgs.mkShell {
buildInputs = with pkgs; [
buildInputs = with pkgs; with flakePkgs; [
yarn
nodejs-18_x
python3
ffmpeg
(callPackage ./nixos/prismaPatched.nix { })
prisma-patched
pkg-config
(vips.override {
libjxl = pkgs.libjxl.overrideAttrs (attrs: {
@ -14,9 +14,7 @@ pkgs.mkShell {
})
];
TGS_TO_GIF =
let package = pkgs.callPackage "${import ./nixos/clansty-flake.nix pkgs}/packages/tgs-to-gif" { };
in "${package}/bin/tgs-to-gif";
TGS_TO_GIF = "${flakePkgs.tgs-to-gif}/bin/tgs-to-gif";
PRISMA_MIGRATION_ENGINE_BINARY = "${pkgs.prisma-engines}/bin/migration-engine";
PRISMA_QUERY_ENGINE_BINARY = "${pkgs.prisma-engines}/bin/query-engine";
PRISMA_QUERY_ENGINE_LIBRARY = "${pkgs.prisma-engines}/lib/libquery_engine.node";