Compare commits

..

1 Commits

Author SHA1 Message Date
bluepython508
d1db6def95 WIP: oauth/oidc 2023-11-07 19:35:03 +00:00
3 changed files with 32 additions and 61 deletions

View File

@@ -1,21 +1,14 @@
{ { lib, self, mixRelease, fetchMixDeps, elixir }: mixRelease rec {
lib, pname = "sso_bsn";
self, version = "0.0.1";
mixRelease,
fetchMixDeps,
elixir,
}:
mixRelease rec {
pname = "sso_bsn";
version = "0.0.1";
inherit elixir; inherit elixir;
src = self; src = self;
mixFodDeps = fetchMixDeps { mixFodDeps = fetchMixDeps {
pname = "mix-deps-${pname}"; pname = "mix-deps-${pname}";
inherit version src; inherit version src;
sha256 = "sha256-hQlMy0e1Kv2zBXYCiNHYlIO0N00wuIW8B+ZlsEMTSy0="; sha256 = "sha256-hQlMy0e1Kv2zBXYCiNHYlIO0N00wuIW8B+ZlsEMTSy0=";
}; };
ELIXIR_MAKE_CACHE_DIR = "/tmp/.elixir-make-cache"; ELIXIR_MAKE_CACHE_DIR = "/tmp/.elixir-make-cache";
} }

View File

@@ -1,27 +1,19 @@
{ {
description = "A simple OIDC SSO service"; description = "A simple OIDC SSO service";
outputs = { outputs = { self, nixpkgs, systems }: let
self,
nixpkgs,
systems,
}: let
inherit (nixpkgs) lib; inherit (nixpkgs) lib;
eachSystem = f: eachSystem = f: lib.genAttrs (import systems) (system: f {
lib.genAttrs (import systems) (system: inherit system;
f { pkgs = nixpkgs.legacyPackages.${system};
inherit system; ownPkgs = self.packages.${system};
pkgs = nixpkgs.legacyPackages.${system};
ownPkgs = self.packages.${system};
});
in {
devShells = eachSystem ({pkgs, ...}: {
default = pkgs.beam.packages.erlang_26.callPackage ./shell.nix {};
}); });
packages = eachSystem ({pkgs, ...}: { in {
default = pkgs.beam.packages.erlang_26.callPackage ./default.nix { devShells = eachSystem ({ pkgs, ... }: {
inherit self; default = pkgs.beam.beamLib.callPackage ./shell.nix {};
}; });
packages = eachSystem ({ pkgs, ... }: {
default = pkgs.beam.packages.erlang.callPackage ./default.nix { inherit self; inherit (pkgs) elixir; };
}); });
}; };
} }

View File

@@ -1,24 +1,10 @@
{ { mkShell, elixir, elixir-ls, inotify-tools, sqlite-interactive }:
lib, mkShell {
pkgs, packages = [ elixir elixir-ls inotify-tools sqlite-interactive ];
mkShell, shellHook = ''
elixir, mkdir -p .nix-mix
elixir-ls, mkdir -p .nix-hex
inotify-tools, export MIX_HOME=$PWD/.nix-mix
sqlite-interactive, export HEX_HOME=$PWD/.nix-hex
}: '';
mkShell { }
packages =
[elixir elixir-ls sqlite-interactive]
++ lib.lists.optional (pkgs.system == "x86_64-linux") inotify-tools
++ lib.lists.optionals (pkgs.system == "aarch64-darwin") (with pkgs.darwin.apple_sdk.frameworks; [
CoreFoundation
CoreServices
]);
shellHook = ''
mkdir -p .nix-mix
mkdir -p .nix-hex
export MIX_HOME=$PWD/.nix-mix
export HEX_HOME=$PWD/.nix-hex
'';
}