~rfc1149/adasockets

4e58fecf5c8b25a598778bcd1095def6ed27300c — Samuel Tardieu 5 months ago 7b63ef8
Full flake support for NixOS
3 files changed, 29 insertions(+), 13 deletions(-)

A .builds/nixos-flake.yml
M flake.lock
M flake.nix
A .builds/nixos-flake.yml => .builds/nixos-flake.yml +8 -0
@@ 0,0 1,8 @@
image: nixos/unstable
arch: x86_64
environment:
  NIX_CONFIG: "experimental-features = nix-command flakes"
tasks:
  - build-flake: |
      cd adasockets
      nix build

M flake.lock => flake.lock +7 -6
@@ 5,11 5,11 @@
        "systems": "systems"
      },
      "locked": {
        "lastModified": 1689068808,
        "narHash": "sha256-6ixXo3wt24N/melDWjq70UuHQLxGV8jZvooRanIHXw0=",
        "lastModified": 1701680307,
        "narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=",
        "owner": "numtide",
        "repo": "flake-utils",
        "rev": "919d646de7be200f3bf08cb76ae1f09402b6f9b4",
        "rev": "4022d587cbbfd70fe950c1e2083a02621806a725",
        "type": "github"
      },
      "original": {


@@ 20,15 20,16 @@
    },
    "nixpkgs": {
      "locked": {
        "lastModified": 1690400617,
        "narHash": "sha256-EjEfE/g6NZ+okI91hFK9g1boa5K6nMNKgwvL/oAkuls=",
        "lastModified": 1703625305,
        "narHash": "sha256-siq0PKYsQ/RUPUKnuvq8nzZNEu12kMnWVaXBqLpRMY4=",
        "owner": "nixos",
        "repo": "nixpkgs",
        "rev": "906f999a2fc8ff1617bd6ca5866157e8aab78260",
        "rev": "719483f4a866418d5ef889adbe11553828167ce7",
        "type": "github"
      },
      "original": {
        "owner": "nixos",
        "ref": "master",
        "repo": "nixpkgs",
        "type": "github"
      }

M flake.nix => flake.nix +14 -7
@@ 1,8 1,8 @@
{
  description = "Development flake for AdaSockets";
  description = "BSD sockets for Ada";

  inputs = {
    nixpkgs.url = "github:nixos/nixpkgs";
    nixpkgs.url = "github:nixos/nixpkgs/master";
    flake-utils.url = "github:numtide/flake-utils";
  };



@@ 10,12 10,19 @@
    flake-utils.lib.eachDefaultSystem (system:
      let pkgs = import nixpkgs { inherit system; };
      in {
        devShells.default = pkgs.mkShell {
          packages = with pkgs; [
        packages.default = pkgs.stdenv.mkDerivation {
          name = "adasockets";
          src = self;
          nativeBuildInputs = with pkgs; [
            autoreconfHook gnat autoconf automake libtool gnum4 texinfo
            texlive.combined.scheme-small autogen pre-commit
            texlive.combined.scheme-small autogen pre-commit makeWrapper
          ];
          configureFlags = [ "--disable-examples" "--disable-tests" ];
          postInstall = ''
            wrapProgram $out/bin/adasockets-config \
              --prefix PATH : ${pkgs.pkg-config}/bin \
              --prefix PKG_CONFIG_PATH : $out/lib/pkgconfig
          '';
        };
      }
    );
      });
}