Added package template

This commit is contained in:
rotterdam 2023-04-06 12:25:33 -03:00
parent 78023b3b12
commit 868d01d3a1
3 changed files with 37 additions and 0 deletions

4
package/.envrc Normal file
View file

@ -0,0 +1,4 @@
if ! has nix_direnv_version || ! nix_direnv_version 2.2.1; then
source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/2.2.1/direnvrc" "sha256-zelF0vLbEl5uaqrfIzbgNzJWGmLzCmYAkInj/LNxvKs="
fi
use flake

17
package/flake.nix Normal file
View file

@ -0,0 +1,17 @@
{
description = "Flake template for nix package";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils, ... }:
flake-utils.lib.eachDefaultSystem (system:
let pkgs = import nixpkgs { inherit system; };
in with pkgs; {
devShells.default = mkShell { packages = [ ]; };
packages.default = self.packages."${system}".package;
packages."package" = pkgs.callPackage ./package.nix { };
});
}

16
package/package.nix Normal file
View file

@ -0,0 +1,16 @@
{ lib
, stdenv
}:
stdenv.mkDerivation (finalAttrs: {
pname = "";
version = "";
meta = with lib; {
description = "";
homepage = "";
license = licenses.;
platforms = platforms.all;
};
})