Skip to content

Commit

Permalink
Merge pull request #75 from youhaveme9/package-nix
Browse files Browse the repository at this point in the history
Package nix
  • Loading branch information
youhaveme9 authored Jan 9, 2025
2 parents 3c37823 + 50f5645 commit 8e9a497
Show file tree
Hide file tree
Showing 2 changed files with 141 additions and 0 deletions.
82 changes: 82 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

59 changes: 59 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
{
description = "FlexAuth - inhouse-auth";

inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
rust-overlay = {
url = "github:oxalica/rust-overlay";
inputs = {
nixpkgs.follows = "nixpkgs";
flake-utils.follows = "flake-utils";
};
};
};

outputs = { self, nixpkgs, flake-utils, rust-overlay }:
flake-utils.lib.eachDefaultSystem (system:
let
# name = "FlexAuth";
# src = ./.;
overlays = [ (import rust-overlay) ];
pkgs = import nixpkgs {
inherit system overlays;
};
in
with pkgs;
{
devShells.default = mkShell {
nativeBuildInputs = [
rust-bin.stable.latest.default
openssl_1_1
pkg-config
];

buildInputs = [
openssl_1_1
pkg-config
zlib
];

CARGO_HOME = "${pkgs.writeTextDir "cargo-home" ""}";
OPENSSL_DIR = "${openssl_1_1}";
};

packages.default = pkgs.rustPlatform.buildRustPackage {
pname = "inhouse-auth";
version = "0.1.0";
src = ./.;

nativeBuildInputs = [
openssl
pkg-config
];

cargoHash = "sha256-wZ5q6Ghkr9/14cLZqASlPZZI4pktxmHy0BxOmzIbrMM=";
};
}
);
}

0 comments on commit 8e9a497

Please sign in to comment.