From 4e4febb281cc7ac04b45166332e6c3193d0b3979 Mon Sep 17 00:00:00 2001 From: Vinzenz Schroeter Date: Thu, 7 Nov 2024 20:34:52 +0100 Subject: [PATCH] wip nix flake --- flake.nix | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/flake.nix b/flake.nix index 230c912..ced5161 100644 --- a/flake.nix +++ b/flake.nix @@ -7,18 +7,19 @@ outputs = inputs@{ self, nixpkgs }: - rec { - packages.hello = nixpkgs.rustPlatform.buildRustPackage rec { + let + servicepoint-simulator = nixpkgs.legacyPackages.x86_64-linux.rustPlatform.buildRustPackage rec { pname = "servicepoint-simulator"; version = "0.0.1"; - src = [ ]; # TODO: src, Cargo.toml etc + src = ./.; # TODO: src, Cargo.toml etc buildInputs = [ ]; - nativeBuildInputs = with nixpkgs.legacyPackages.x86_64-linux; [ pkgconfig ]; - cargoSha256 = "sha256-0hfmV4mbr3l86m0X7EMYTOu/b+BjueVEbbyQz0KgOFY="; + nativeBuildInputs = with nixpkgs.legacyPackages.x86_64-linux; [ pkg-config ]; + #cargoSha256 = "sha256-0hfmV4mbr3l86m0X7EMYTOu/b+BjueVEbbyQz0KgOFY="; + cargoLock.lockFile = ./Cargo.lock; meta = with nixpkgs.stdenv.lib; { homepage = ""; @@ -26,10 +27,12 @@ #license = licenses.gplv3; }; - legacyPackages = packages; - - defaultPackage = packages.hello; }; + in + rec { + packages.x86_64-linux.default = servicepoint-simulator; + + legacyPackages = packages; devShells.x86_64-linux.default = import ./shell.nix { pkgs = nixpkgs.legacyPackages.x86_64-linux; };