Clean up and update flake
This commit is contained in:
		
							parent
							
								
									99524e6a82
								
							
						
					
					
						commit
						ca369cd30e
					
				
					 2 changed files with 32 additions and 18 deletions
				
			
		
							
								
								
									
										23
									
								
								flake.lock
									
										
									
										generated
									
									
									
								
							
							
						
						
									
										23
									
								
								flake.lock
									
										
									
										generated
									
									
									
								
							| 
						 | 
				
			
			@ -1,26 +1,27 @@
 | 
			
		|||
{
 | 
			
		||||
  "nodes": {
 | 
			
		||||
    "flake-utils": {
 | 
			
		||||
    "nix-filter": {
 | 
			
		||||
      "locked": {
 | 
			
		||||
        "lastModified": 1653893745,
 | 
			
		||||
        "narHash": "sha256-0jntwV3Z8//YwuOjzhV2sgJJPt+HY6KhU7VZUL0fKZQ=",
 | 
			
		||||
        "lastModified": 1653590866,
 | 
			
		||||
        "narHash": "sha256-E4yKIrt/S//WfW5D9IhQ1dVuaAy8RE7EiCMfnbrOC78=",
 | 
			
		||||
        "owner": "numtide",
 | 
			
		||||
        "repo": "flake-utils",
 | 
			
		||||
        "rev": "1ed9fb1935d260de5fe1c2f7ee0ebaae17ed2fa1",
 | 
			
		||||
        "repo": "nix-filter",
 | 
			
		||||
        "rev": "3e81a637cdf9f6e9b39aeb4d6e6394d1ad158e16",
 | 
			
		||||
        "type": "github"
 | 
			
		||||
      },
 | 
			
		||||
      "original": {
 | 
			
		||||
        "id": "flake-utils",
 | 
			
		||||
        "type": "indirect"
 | 
			
		||||
        "owner": "numtide",
 | 
			
		||||
        "repo": "nix-filter",
 | 
			
		||||
        "type": "github"
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    "nixpkgs": {
 | 
			
		||||
      "locked": {
 | 
			
		||||
        "lastModified": 1655200170,
 | 
			
		||||
        "narHash": "sha256-/yzkX+10sJhYNIcTtZ5ObS+nh/HrJp01XLaubzbRDcU=",
 | 
			
		||||
        "lastModified": 1659052185,
 | 
			
		||||
        "narHash": "sha256-TUbwbzCbprtWB9EtXPM52cWuKETuCV3H+cMXjLRbwTw=",
 | 
			
		||||
        "owner": "nixos",
 | 
			
		||||
        "repo": "nixpkgs",
 | 
			
		||||
        "rev": "9ff91ce2e4c5d70551d4c8fd8830931c6c6b26b8",
 | 
			
		||||
        "rev": "9370544d849be8a07193e7611d02e6f6f1b10768",
 | 
			
		||||
        "type": "github"
 | 
			
		||||
      },
 | 
			
		||||
      "original": {
 | 
			
		||||
| 
						 | 
				
			
			@ -48,7 +49,7 @@
 | 
			
		|||
    },
 | 
			
		||||
    "root": {
 | 
			
		||||
      "inputs": {
 | 
			
		||||
        "flake-utils": "flake-utils",
 | 
			
		||||
        "nix-filter": "nix-filter",
 | 
			
		||||
        "nixpkgs": "nixpkgs",
 | 
			
		||||
        "npmlock2nix": "npmlock2nix"
 | 
			
		||||
      }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										27
									
								
								flake.nix
									
										
									
									
									
								
							
							
						
						
									
										27
									
								
								flake.nix
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -3,6 +3,7 @@
 | 
			
		|||
 | 
			
		||||
  inputs = {
 | 
			
		||||
    nixpkgs.url = "github:nixos/nixpkgs/nixos-22.05";
 | 
			
		||||
    nix-filter.url = "github:numtide/nix-filter";
 | 
			
		||||
    npmlock2nix = {
 | 
			
		||||
      url = "github:nix-community/npmlock2nix";
 | 
			
		||||
      flake = false;
 | 
			
		||||
| 
						 | 
				
			
			@ -12,7 +13,7 @@
 | 
			
		|||
  outputs = {
 | 
			
		||||
    self,
 | 
			
		||||
    nixpkgs,
 | 
			
		||||
    flake-utils,
 | 
			
		||||
    nix-filter,
 | 
			
		||||
    npmlock2nix,
 | 
			
		||||
  }: let
 | 
			
		||||
    # At the moment, we only deploy to x86_64-linux. Update when we
 | 
			
		||||
| 
						 | 
				
			
			@ -27,7 +28,11 @@
 | 
			
		|||
  in {
 | 
			
		||||
    packages.${system} = rec {
 | 
			
		||||
      tlaternet-templates = pkgs.npmlock2nix.build {
 | 
			
		||||
        src = self;
 | 
			
		||||
        src = pkgs.lib.cleanSource self;
 | 
			
		||||
 | 
			
		||||
        buildInputs = with pkgs; [
 | 
			
		||||
          util-linux
 | 
			
		||||
        ];
 | 
			
		||||
 | 
			
		||||
        installPhase = ''
 | 
			
		||||
          cp -r dist $out/
 | 
			
		||||
| 
						 | 
				
			
			@ -35,8 +40,6 @@
 | 
			
		|||
 | 
			
		||||
        node_modules_attrs = {
 | 
			
		||||
          buildInputs = with pkgs; [
 | 
			
		||||
            elmPackages.elm
 | 
			
		||||
 | 
			
		||||
            pkg-config
 | 
			
		||||
            python3
 | 
			
		||||
            vips
 | 
			
		||||
| 
						 | 
				
			
			@ -50,11 +53,21 @@
 | 
			
		|||
 | 
			
		||||
    devShells.${system} = {
 | 
			
		||||
      default = pkgs.npmlock2nix.shell {
 | 
			
		||||
        src = self;
 | 
			
		||||
        src = nix-filter.lib {
 | 
			
		||||
          root = self;
 | 
			
		||||
          include = [
 | 
			
		||||
            "package.json"
 | 
			
		||||
            "package-lock.json"
 | 
			
		||||
          ];
 | 
			
		||||
        };
 | 
			
		||||
 | 
			
		||||
        buildInputs = with pkgs.nodePackages; [
 | 
			
		||||
          npm-check-updates
 | 
			
		||||
          prettier
 | 
			
		||||
        ];
 | 
			
		||||
 | 
			
		||||
        node_modules_attrs = {
 | 
			
		||||
          buildInputs = with pkgs; [
 | 
			
		||||
            elmPackages.elm
 | 
			
		||||
 | 
			
		||||
            pkg-config
 | 
			
		||||
            python3
 | 
			
		||||
            vips
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Reference in a new issue