diff --git a/flake.nix b/flake.nix index f694ac8..111933a 100644 --- a/flake.nix +++ b/flake.nix @@ -6,7 +6,7 @@ }; outputs = inputs@{ self, nixpkgs, ... }: { - packages = nixpkgs.lib.attrsets.genAttrs nixpkgs.lib.systems.flakeExposed (system: import ./nix { + legacyPackages = nixpkgs.lib.attrsets.genAttrs nixpkgs.lib.systems.flakeExposed (system: import ./nix { inherit system inputs; pkgs = nixpkgs.legacyPackages.${system}; }); diff --git a/nix/backend.nix b/nix/backend.nix new file mode 100644 index 0000000..b2c031e --- /dev/null +++ b/nix/backend.nix @@ -0,0 +1,19 @@ +{ + lib, + rustPlatform, + stdenv, +}: + +rustPlatform.buildRustPackage rec { + pname = "backend"; + version = "0.1"; + + src = ../.; + + cargoHash = "sha256-NRrWWD3e2zm4rVYyCPm3vQhPDRkVMauTnoENwRucXcw="; + + meta = with lib; { + platforms = lib.platforms.all; + mainProgram = "backend"; + }; +} diff --git a/nix/default.nix b/nix/default.nix index b30fa70..9f96829 100644 --- a/nix/default.nix +++ b/nix/default.nix @@ -2,4 +2,5 @@ { native = pkgs.callPackage ./native.nix {}; + backend = pkgs.callPackage ./backend.nix {}; } diff --git a/nix/native.nix b/nix/native.nix index cf696c7..76878d9 100644 --- a/nix/native.nix +++ b/nix/native.nix @@ -15,6 +15,7 @@ stdenv.mkDerivation { meta = { maintainers = with lib.maintainers; [ jopejoe1 ]; + mainProgram = "license-tool"; platforms = lib.platforms.all; }; }