From: Vincent Bernat Date: Sun, 6 Feb 2022 08:53:41 +0000 (+0100) Subject: build: use Nix flake X-Git-Tag: 1.0.14~22 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=df7dd150dd941b5e8dfd8e685db5a72964d1bc38;p=thirdparty%2Flldpd.git build: use Nix flake --- diff --git a/default.nix b/default.nix deleted file mode 100644 index 4b33658b..00000000 --- a/default.nix +++ /dev/null @@ -1,18 +0,0 @@ -{ pkgs ? import {} -}: - -with pkgs; -stdenv.mkDerivation rec { - name = "lldpd"; - src = nix-gitignore.gitignoreSource [] ./.; - configureFlags = [ - "--localstatedir=/var" - "--enable-pie" - "--with-snmp" - "--with-systemdsystemunitdir=\${out}/lib/systemd/system" - ]; - - nativeBuildInputs = [ pkgconfig autoreconfHook git check ]; - buildInputs = [ libevent readline net-snmp openssl ]; - outputs = [ "out" "dev" "man" "doc" ]; -} diff --git a/flake.lock b/flake.lock new file mode 100644 index 00000000..972ca2e8 --- /dev/null +++ b/flake.lock @@ -0,0 +1,42 @@ +{ + "nodes": { + "flake-utils": { + "locked": { + "lastModified": 1642700792, + "narHash": "sha256-XqHrk7hFb+zBvRg6Ghl+AZDq03ov6OshJLiSWOoX5es=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "846b2ae0fc4cc943637d3d1def4454213e203cba", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1644135594, + "narHash": "sha256-EV+8+YsN0apcVm+rBRc9iY1HzWU1gXqGIXSoYIU8QZU=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "bb96e481b317c770281c1bfd9e6face9bfe0888f", + "type": "github" + }, + "original": { + "owner": "nixos", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 00000000..e5484773 --- /dev/null +++ b/flake.nix @@ -0,0 +1,27 @@ +{ + inputs = { + nixpkgs.url = "github:nixos/nixpkgs"; + flake-utils.url = "github:numtide/flake-utils"; + }; + outputs = { self, flake-utils, ... }@inputs: + flake-utils.lib.eachDefaultSystem (system: + let + pkgs = inputs.nixpkgs.legacyPackages."${system}"; + in + { + defaultPackage = pkgs.stdenv.mkDerivation rec { + name = "lldpd"; + src = pkgs.nix-gitignore.gitignoreSource [ ] ./.; + configureFlags = [ + "--localstatedir=/var" + "--enable-pie" + "--with-snmp" + "--with-systemdsystemunitdir=\${out}/lib/systemd/system" + ]; + + nativeBuildInputs = with pkgs; [ pkgconfig autoreconfHook git check ]; + buildInputs = with pkgs; [ libevent readline net-snmp openssl ]; + outputs = [ "out" "dev" "man" "doc" ]; + }; + }); +}