From 042e8299f1e72105c4d16fd3eda28c76b056ed83 Mon Sep 17 00:00:00 2001 From: Aaron Kaiser Date: Tue, 15 Oct 2024 15:15:54 +0200 Subject: [PATCH] add nix build file --- Cargo.lock | 4 ++-- shell.nix => default.nix | 12 ++++++++++-- flake.lock | 26 -------------------------- flake.nix | 12 ------------ 4 files changed, 12 insertions(+), 42 deletions(-) rename shell.nix => default.nix (70%) delete mode 100644 flake.lock delete mode 100644 flake.nix diff --git a/Cargo.lock b/Cargo.lock index 06c2609..a034759 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -362,9 +362,9 @@ dependencies = [ [[package]] name = "rustls-pki-types" -version = "1.9.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e696e35370c65c9c541198af4543ccd580cf17fc25d8e05c5a242b202488c55" +checksum = "16f1201b3c9a7ee8039bcadc17b7e605e2945b27eee7631788c1bd2b0643674b" [[package]] name = "rustls-webpki" diff --git a/shell.nix b/default.nix similarity index 70% rename from shell.nix rename to default.nix index 2a3883d..fe2eecd 100644 --- a/shell.nix +++ b/default.nix @@ -16,8 +16,16 @@ let ed25519_agent = callPackage "${harness}/default.nix" { inherit pkgs; agent = ed25519_agent_lib; }; in -mkShell { - name = "agent-test"; +rustPlatform.buildRustPackage { + name = "tls-server"; + + cargoLock = { + lockFile = ./Cargo.lock; + outputHashes = { + "agent_lib-0.1.0" = "sha256-6hKSZxh7nVOlSKA/0mhbGPaJ1PJnVyd33Yc8fOuRfwA="; + "shared_memory_heap-0.1.0" = "sha256-aQ7dKzU5Lf6bFArAO7b4QDYC7Lt2vG5ggHpq2R9s9Qo="; + }; + }; ED25519_AGENT_PATH = "${ed25519_agent}/bin/agent_harness"; ED25519_KEYFILE = "./keyfile"; diff --git a/flake.lock b/flake.lock deleted file mode 100644 index 0805874..0000000 --- a/flake.lock +++ /dev/null @@ -1,26 +0,0 @@ -{ - "nodes": { - "nixpkgs": { - "locked": { - "lastModified": 1728018373, - "narHash": "sha256-NOiTvBbRLIOe5F6RbHaAh6++BNjsb149fGZd1T4+KBg=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "bc947f541ae55e999ffdb4013441347d83b00feb", - "type": "github" - }, - "original": { - "id": "nixpkgs", - "ref": "nixos-unstable", - "type": "indirect" - } - }, - "root": { - "inputs": { - "nixpkgs": "nixpkgs" - } - } - }, - "root": "root", - "version": 7 -} diff --git a/flake.nix b/flake.nix deleted file mode 100644 index 0c3c1cf..0000000 --- a/flake.nix +++ /dev/null @@ -1,12 +0,0 @@ -{ - inputs.nixpkgs.url = "nixpkgs/nixos-unstable"; - - outputs = { nixpkgs, ... }: - let - system = "x86_64-linux"; - pkgs = import nixpkgs { inherit system; }; - in - { - devShells.${system}.default = pkgs.callPackage ./shell.nix { inherit pkgs; }; - }; -}